编写一个程序,为一个给定的年份找出其对应的中国生肖。中国的生肖基于12年一个周期,每年用一个动物代表:rat、ox、tiger、rabbit、dragon、snake、horse、sheep、monkey、rooster、dog、pig。
package com.company;
/**
* @lzx
* @param args
*/
public class lzx {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("请输入需要查询的年份:");
int num = scanner.nextInt(