package day5
;
public class shuzu3
{
public static void main(String
[] args
)
{
String
[] weeks
= {"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"};
java
.util
.Scanner input
= new java.util.Scanner(System
.in
);
System
.out
.println("请输入星期(1-7):");
int week
= input
.nextInt();
if(week
>7 || week
<1)
System
.out
.println("输入有误!");
else
System
.out
.println(week
+"对应的星期的单词是:"+ weeks
[week
-1]);
}
}
转载请注明原文地址:https://tech.qufami.com/read-5075.html