My assignment is to create a program that accepts a list of exam scores (ranges from 0-100) and output the total number of grades and then the number of each in letter grade..
but my problem in the beginning of doing my program is:
public class Grades {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int grade= 0;
int nega= 0;
do{
grade=Integer.parseInt(JOptionPane.showInputDialog(null,"Enter Grade:"));
}while (grade >0);
if (grade>0)
{
JOptionPane.showMessageDialog(null,"The Input Numbers are:"+ grade+"");
}
}
}
instead of the grades the i have inputted should be the output, the negative number that i have inputted is the one who's become my output, the negative number should serve as my sentinal value, it should not show on the output.
please help thanks