I am not sure what I am doing that is causing it not to print. I havent completly finished the program yet, I have decided to just try and get it to print right first...haha. My math was right but it wouldnt loop once I set it up to loop it won't print...any guidance would be appreciated.
This is what I am working on.....right now I am just trying to get it to print message1 when the input is zero. Any help would be appreciated. Here is what I have so far.
import java.util.Scanner;//program that uses a class scanner import java.lang.Float; import javax.swing.JOptionPane; //Dialog Boxes //Program that reads numbers public class NumberCounter { public static void main(String args[]) { Scanner input = new Scanner( System.in ); int Entries = 1; //Total of all numbers entered int Total = 0; //Total sum of numbers int Large; //Largest number in group int Small; //Smallest number in group float Average; //Average of numbers entered do{ String counter= JOptionPane.showInputDialog("Input numbers to check:"); float Number1 = Float.parseFloat(counter); Entries ++; Total += Number1; Average = Total / Entries; }while(Number1 != 0); String message1= String.format("Total number of Entries : %d\n Numbers entered: %.0f\n Average of all numbers:%.0d\n Total sum of all numbers:%d", Entries, Number1, Average, Total); JOptionPane.showMessageDialog(null, message1); } //end method main } //end class NumberCounter