fork download
  1. #include <stdio.h>
  2.  
  3. int main(){
  4.  
  5. double money,tax;
  6.  
  7. money = 15e8;
  8.  
  9. if(money<=1e8){
  10. tax=1e8*0.1;}
  11. else if(money<=5e8){
  12. tax=1e8*0.1+(money-1e8)*0.2;}
  13. else if(money<=10e8){
  14. tax=1e8*0.1+4e8*0.2+(money-5e8)*0.3;}
  15. else if(money<=30e8){
  16. tax=1e8*0.1 + 4e8*0.2 + 5e8*0.3 + (money-1e9)*0.4;}
  17. else
  18. tax=1e8*0.1+4e8*0.2+5e8*0.3+20e8*0.4+(money-30e8)*0.5;
  19. printf("상속세는 %lf",tax);
  20.  
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 1832KB
stdin
Standard input is empty
stdout
상속세는 440000000.000000