java三角形nextday佣金题目代码
三角形问题: import java.util.Scanner; public class sanjiaoxing { public static void main(String[] args) { System.out.print(“Enter 3 integers which are sides of a triangle:\n“); Scanner =new Scanner(System.in); double a=.nextDouble(); double b=.nextDouble(); double c=.nextDouble(); System.out.println(“side a is:“+a+“ side b is:“+b+“ side c is:“+c); boolean istriangle=true; if((a+b)month || month>12) { System.out.print(“请输入1~12范围内的月份!\n“); } if(1>day || day>31) { System.out.print(“请输入1~31范围内的日期!\n“); } else { //System.out.print(“year is:“+year+“ month is:“+month+“ day is:“+day+“\n“); int tomorrowday = day,tomorrowmonth=month,tomorrowyear=year; switch(month) { case (1): case (3): case (5): case (7): case (8): case (10): if(day<31) { tomorrowday=day+1; } else { tomorrowday=1; tomorrowmonth=month+1; } System.out.print(“Tomorrow s date is:“+tomorrowyear+“/“+tomorrowmonth+“/“+tomorrowday); break; case 4: case 6: case 9: case 11: if(day<30) { tomorrowday=day+1; } else if(day==30) { tomorrowday=1; tomorrowmonth=month+1; } else if(day==31) { System.out.print(month+“月没有31天!“); break; } System.out.print(“Tomorrow s date is:“+tomorrowyear+“/“+tomorrowmonth+“/“+tomorrowday); break; case 12: if(day<31) { tomorrowday=day+1; } else if(day==31) { tomorrowday=1; tomorrowmonth=1; tomorrowyear=year+1; } System.out.print(“Tomorrow s date is:“+tomorrowyear+“/“+tomorrowmonth+“/“+tomorrowday); break; case 2: if(day<28) { tomorrowday=day+1; } else if(day==28) { if((year%4==0 } else { tomorrowday=1; tomorrowmonth=3; } } else if(day==29) { if((