java - Switch statement -
how can add conditions switch statement?(ex:-displaying grade average marks)
i recommend using if-else... switch
statements can compare on equality.
with integer score, like...
switch (score) { case 100: case 99: case 98: case 97: case 96: case 95: case 94: case 93: case 92: case 91: case 90: grade = 'a'; break; case 89: /* ... */ }
see problem? :-)
Comments
Post a Comment