if ... else if statement

java.util.Scanner Import; 
public class demo12 {
// define a main method
public static void main (String [] args) {
// create output objects and precautionary statements
Scanner Scanner new new SC = (the System.in);
the System.out .println ( "Please enter the score or Xiaoming:");
// data receiving
int X-sc.nextInt = ();
// if statement using the input data and outputs a determination statement
if (X> 100 || X < 0) {
System.out.println ( "you have entered a wrong score");
} the else IF (X-<= X-100 &&> = 95) {
System.out.println ( "a mountain bike");
} the else IF (X-<= 94 && X-> = 90) {
System.out.println ( "playground, a");
} the else IF (X-<&& X-89> = 80) {
the System.out.println ( "a Transformers");
} the else {
System.out.println ( "fat meal beat");
}
}
}

Guess you like

Origin www.cnblogs.com/shlo/p/11666173.html