import java.util.Scanner; |
public class code1 { |
public static void main(String[] args){ |
Scanner in = new Scanner(System.in); |
System.out.print( "请输入你的性别:" ); |
String sex=in.next(); |
if (sex.equals( "男" )){ |
System.out.println( "请输入你的年龄:" ); |
int age=in.nextInt(); |
if (age>= 18 ){ |
System.out.println( "你成年了啊" ); |
} else { |
System.out.println( "你还未成年啊" ); |
} |
} else { |
System.out.println( "你是个女的啊" ); |
} |
System.out.println( "请输入你的成绩:" ); |
int score=in.nextInt(); |
if (score>= 80 ){ |
System.out.println( "优秀" ); |
} else if (score>= 70 ){ |
System.out.println( "良好" ); |
} else if (score>= 60 ){ |
System.out.println( "及格" ); |
} else { |
System.out.println( "不及格" ); |
} |
} |
} |