mercredi 4 novembre 2015

Why can I not add an 'else' statement after my 'if'?

this is just a snippit of code.

if (finalScore <= 100 && finalScore >=90) {
     a = (++a);
     JOptionPane.showMessageDialog(null, "Lab grade = " + (labScore*100)/90 + "\t" + "%" + "\n" + "Quiz grade = " + (quizScore*100)/148 + "%" + "\n" + "Your final grade = " + finalScore + "%" + "\n" + "You got an A!");  
     int reply = JOptionPane.showConfirmDialog(null, "Would you like to stop grading?" + "\n" + "Press no to continue");
     if (reply == JOptionPane.YES_OPTION); {
     no = (no+1);

Aucun commentaire:

Enregistrer un commentaire