int ct=0; BufferedReader input=new BufferedReader(new InputStreamReader(System.in)); do { System.out.println("Enter Grade:"); int grade=0; grade = Integer.parseInt(input.readLine()); ct++; // start if(grade==0 || grade==1 || grade==2 || grade==3 || grade==4 || grade==5 || grade==6 || grade==7 || grade==8 || grade==9 || grade==10) { // missing statement and agruments} else if(grade==11 || grade==12 || grade==13 || grade==14 || grade==15 || grade==16 || grade==17 || grade==18 || grade==19 || grade==20) {} else if(grade==21 || grade==22 || grade==23 || grade==24 || grade==25 || grade==26 || grade==27 || grade==28 || grade==29 || grade==30) {} else if(grade==31 || grade==32 || grade==33 || grade==34 || grade==35 || grade==36 || grade==37 || grade==38 || grade==39 || grade==40) {} else if(grade==41 || grade==42 || grade==43 || grade==44 || grade==45 || grade==46 || grade==47 || grade==48 || grade==49 || grade==50) {} else if(grade==51 || grade==52 || grade==53 || grade==54 || grade==55 || grade==56 || grade==57 || grade==58 || grade==59 || grade==60) {} else if(grade==61 || grade==62 || grade==63 || grade==64 || grade==65 || grade==66 || grade==67 || grade==68 || grade==69 || grade==70) {} else if(grade==71 || grade==72 || grade==73 || grade==74 || grade==75 || grade==76 || grade==77 || grade==78 || grade==79 || grade==80) {} else if(grade==81 || grade==82 || grade==83 || grade==84 || grade==85 || grade==86 || grade==87 || grade==88 || grade==89 || grade==90) {} else if(grade==91 || grade==92 || grade==93 || grade==94 || grade==95 || grade==96 || grade==97 || grade==98 || grade==99 || grade==100) {} else { System.out.println("Error only 0-100!Going back to Menu"); menus(); } //end of else if conditions } while(ct<=9);// do bracket; System.out.println("00-10"+asterisk+""); System.out.println("11-20"+asterisk2+""); System.out.println("21-30"+asterisk3+""); System.out.println("41-50"+asterisk4+""); // display grades and count using asterisk(*) System.out.println("61-70"+asterisk5+""); System.out.println("71-80"+asterisk6+""); System.out.println("81-90"+asterisk7+""); System.out.println("91-100"+asterisk8+""); }
My problem is that i don't know how to count it after the input of grades and print asterisk on each condition.