chocolate boy123 wrote: » Hi I am studying Java and I am finding the for loop a little confusing for example how would I solve this problem, write a for loop to enter the grade of 10 students, then display what percentage got an honour. An honour is over 70... Can ye please explain the answer in parts as I want to study it and make myself a similar question to test myself, thanks in advance!
chocolate boy123 wrote: » Int student; Int mark; Double percent; For (student=1, student <10, student++){ String studentStr=JOptionPane.showInputDialog("enter the mark"); studentStr=Integer.parseInt(student); If (mark <=70)
chocolate boy123 wrote: » As in studentcount<maxstudentcount. I now see you had that = to 10 so is that the same as putting <10 in the for loop? ... How can I get my program to count all over 70 grades would this be done with count++;
chocolate boy123 wrote: » How can I make my program like this ... If (mark <70) Don't count it Else Count it ..... Is it possible to do this in Java