Advertisement
Rehan_Rahman26

uri 1051

May 6th, 2021
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4.     float a,t;
  5.     scanf("%f",&a);
  6.     if(a>0.00 && a<2000.00) printf("Isento\n");
  7.     else {
  8.         if(a>2000.01 && a<3000.00){
  9.         a = a-2000.00;
  10.         t = ((8*a)/100);
  11.         printf("R$ %.2f\n",t);
  12.     }
  13.     else if(a>3000.01 && a<4500.00){
  14.         a = a-3000.00;
  15.         t = ((18*a)/100) + ((8*1000.00)/100);
  16.         printf("R$ %.2f\n",t);
  17.     }
  18.     else if(a>4500.00 ){
  19.         a = a-4500.00;
  20.         t = ((28*a)/100) +((18*1500.00)/100) + ((8*1000.00)/100);
  21.         printf("R$ %.2f\n",t);
  22.     }
  23.     }
  24.    
  25.     return 0;
  26.    
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement