java实现订单物品计算佣金,java三角形nextday佣金题目代码

41528d3028836879cd698677c3999917.gifjava三角形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((

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值