SwitchTest02.java
/* requirement : 1, The system receives a student's test results , Output grades according to test scores . 2, Grade : excellent :[90-100] good :[80-90) in :[70-80)
pass :[60-70) fail, :[0-60) 3, The required score is a legal number , Results must be in [0-100] between , Scores may have decimal places . use switch Statement implementation . */
public class SwitchTest02{ public static void main(String[] args){ java.util.
Scanner s= new java.util.Scanner(System.in); System.out.print(" Please enter the student's test scores :");
double score = s.nextDouble(); switch((int)score/10){ case 0: case 1: case 2:
case 3: case 4: case 5: System.out.println(" fail, "); break; case 6: System.out.
println(" pass "); break; case 7: System.out.println(" in "); break; case 8: System.out
.println(" good "); break; case 9: case 10: System.out.println(" excellent "); break; default:
System.out.println(" Illegal information "); } } }

Technology
©2019-2020 Toolsou All rights reserved,
switch Statement programming : Give a percentage score , Output grade required A,B,C,D,E.Jetson Nano read GPS data (TTL turn USB)yolov3 Detailed explanation - model structure Android Mobile application foundation learning —— Chapter 1 basic introduction Four years of programming , Or is it inferior Database design AWS Elastic Load Balancing (Amazon ELB) Study notes el-select Parameter problem From outsourcing testing to Alibaba , A girl of three books C++STL Container summary