ceiling - Can I use math ceil with input string in Java? -


is possible make output in java? using looped statements while asking input grades each student use ceiling identify has highest grade.

student number            grades  student 1                  _ student 2 student 3  student 4  student 5 student 6 student 7 student 8 student 9 student 10 

the student highest grade is: (e.g) student 8

yes, can use loop:

scanner scan = new scanner(system.in); double max = -1; // grades can't negative int maxstudent = 0; double[] grades = new double[10]; (int = 1; < grades.length; i++) {     system.out.println("please enter grade student "+i);     grades[i] = scan.nextdouble();     if (grades[i] > max) {         max = grades[i]         maxstudent = i;     } } 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -