zoukankan      html  css  js  c++  java
  • 金融应用,计算酬金 Exercise06_11

     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("
    ————————————————————————————————————————————————");
    11         for(int i=10000;i<=100000;i+=5000){
    12             System.out.printf("%-10d%-10.1f 
    ",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 }
  • 相关阅读:
    OpenFlow 消息
    Revolving Digits
    Tavas and Malekas
    Prefixes and Suffixes
    快速构造后缀自动机
    REBXOR
    BZOJ3689 异或之
    BZOJ3689 异或之
    最长路径异或和
    BZOJ 1355 [Baltic2009] Bazinga
  • 原文地址:https://www.cnblogs.com/cherrydream/p/10173820.html
Copyright © 2011-2022 走看看