、
import java.util.Scanner;
class XingQi {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("输入数值");
int a = sc.nextInt();
if(a=1){
System.out.println("星期一");}
else if (a = 2){
System.out.println("星期二");}
else if (a = 3){
System.out.println("星期三");}
else if (a = 4){
System.out.println("星期四");}
else if (a = 5){
System.out.println("星期五");}
else if (a = 6){
System.out.println("星期六");}
else if (a = 7){
System.out.println("星期天");}
else
System.out.println("您输入的数值错误")
}
}
}
|
|