本帖最后由 aerkadiya 于 2013-5-17 17:17 编辑
class Xingqi
{
public static void main(String[] args)
{
int x=scan.nextInt();
if(x==1)
System.out.println(x+" "+"Monday");
else if(x==2)
System.out.println(x+" "+"Tuesday");
else if(x==3)
System.out.println(x+" "+"Wednesday");
else if(x==4)
System.out.println(x+" "+"Thursday");
else if(x==5)
System.out.println(x+" "+"Friday");
else if(x==6)
System.out.println(x+" "+"Saturday");
else if(x==7)
System.out.println(x+" "+"Sunday");
else
System.out.println("nono");
}
}
如何输入一个随意从键盘上打的数字?
|