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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -