编程计算某年某月某日该年的第多少天。(年月日都由自己输出)帮帮忙了!
public class bx{public static void main(String args[]){
int year,month,day;
for(int i=0;i<args.length;i++){
String temp="";
temp=args[i];
year=temp;
}
int monthday[]={0,31,28,31,30,31,30,31,30,31,30,31};
int total=0;
for(int i=1;i<=month;i++){
total+=montthday[i];
}
if(year%4==0&&y%100!=0||year%400==0)
total++;
total+=day;
System.out.println(total);
}
}