特牛生活网

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

网友收藏
  • 链接地址:https://blog.csdn.net/qq_40990306/article/details/119121299
  • 链接标题:编写一个程序,为一个给定的年份找出其对应的中国生肖。中国的生肖基于12年一个周期, 每年用一个动物代表:rat、ox、tiger、rabbit、dragon、snake、horse、sheep、mon_编写一个程序,为一个给定的年份找出其对应的中国生肖。中国的生肖基于12年一-CSDN博客
  • 所属网站:blog.csdn.net
  • 被收藏次数:2836
文章浏览阅读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("猴年"); .._编写一个程序,为一个给定的年份找出其对应的中国生肖。中国的生肖基于12年一