import java.util.*; public class array11 { //记得修改文件名 public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc=new Scanner(System.in); int a[]= {31,28,31,30,31,30,31,30,31,30,31,30}; int year,month,day,days=0,i; System.out.println("Please input data:"); year=sc.nextInt(); month=sc.nextInt(); day=sc.nextInt(); for(i=0;i2) days=days+1+day; else days=days+day; System.out.println(days); //下面这一段代码涉及另外一个题目,可删除 if(days%5==1 || days%5==2 || days%5==3) { System.out.println("今天应该打鱼!!"); } else { System.out.println("今天应该晒网!!"); } } }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)