标签:题目 iss amount ssi ring system return 计算 ret
1 /** 2 * @author 冰樱梦 3 * 时间:2018年下半年 4 * 题目:金融应用,计算酬金 5 * 6 */ 7 public class Exercise06_11 { 8 public static void main(String[] args){ 9 System.out.printf("%-23s%-22s","销售总额","酬金" ); 10 System.out.println("\n————————————————————————————————————————————————"); 11 for(int i=10000;i<=100000;i+=5000){ 12 System.out.printf("%-10d%-10.1f \n",i,computeCommission(i) ); 13 } 14 } 15 public static double computeCommission(double salesAmount){ 16 double salesMoney = 0; 17 if(0<salesAmount&&salesAmount<=5000) salesMoney=salesAmount*0.08; 18 if(5000<salesAmount&&salesAmount<=10000) salesMoney=(salesAmount-5000)*0.1+5000*0.08; 19 if(salesAmount>10000) salesMoney=(salesAmount-10000)*0.12+5000*0.08+5000*0.1; 20 return salesMoney; 21 } 22 }
标签:题目 iss amount ssi ring system return 计算 ret
原文地址:https://www.cnblogs.com/cherrydream/p/10173820.html