Current location - Quotes Website - Personality signature - Write a small java program and ask for guidance
Write a small java program and ask for guidance

First use the Scanner class to get the input number from the console

Use switch (number). . case for logical judgment

The parameters in switch are operated as follows:

int n=number/10000000//

Then switch(n){

case 1: System.out.println (the student with student number: 13032102 is a student of the School of Electronic Engineering); break;

case 2:.

.

.

deafual 0: System.out.println (the entered student ID does not exist);

}