package Bese; import java.util.Scanner; public class Lu8 { public static void main(String[] args) { Scanner SC=new Scanner( System.in); System.out.println("请输入数字"+"1春天"+"2夏天"+"3秋天"+"4冬天"); int i = SC.nextInt(); if (i==1){ System.out.println("春暖花开"); }else if(i==2){ System.out.println("蝉鸣阵阵"); }else if (i==3){ System.out.println("枫叶萧萧"); }else if (i==4) { System.out.println("寒风瑟瑟"); }else { System.out.println("滚木"); }
if语句的运用
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)