编写一个程序,为一个给定的年份找出其对应的中国生肖。中国的生肖基于12年一个周期, 每年用一个动物代表:rat、ox、tiger、rabbit、dragon、snake、horse、sheep、mon_编写一个程序,为一个给定的年份找出其对应的中国生肖。中国的生肖基于12年一-CSDN博客网友收藏

编写一个程序,为一个给定的年份找出其对应的中国生肖。中国的生肖基于12年一个周期, 每年用一个动物代表:rat、ox、tiger、rabbit、dragon、snake、horse、sheep、mon_编写一个程序,为一个给定的年份找出其对应的中国生肖。中国的生肖基于12年一-CSDN博客

文章浏览阅读1.4k次。System.out.println("请输入你的要查询的年份"); Scanner scanner = new Scanner(System.in); int year = scanner.nextInt(); int shengXiao = year % 12; switch (shengXiao){ case 0: System.out.println(&quot......
阅读全文