daily pastebin goal
63%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. #include<math.h>
  3. int main()
  4.  
  5. {
  6.  
  7. int x,y;
  8.  
  9. scanf("%d %d",&x,&y);
  10.  
  11. double res1=4.00*y;
  12. double res2=4.50*y;
  13. double res3=5.00*y;
  14. double res4=2.00*y;
  15. double res5=1.50*y;
  16.  
  17. if(x==1){
  18.  
  19. printf("Total: R$ %.2lf\n",res1);
  20.  
  21. }
  22.  
  23. else if(x==2){
  24.  
  25.     printf("Total: R$ %.2lf\n",res2);
  26. }
  27.  
  28. else if(x==3){
  29.  
  30.     printf("Total: R$ %.2lf\n",res3);
  31. }
  32.  
  33. else if(x==4){
  34.  
  35.     printf("Total: R$ %.2lf\n",res4);
  36. }
  37.  
  38. else{
  39.  
  40.     printf("Total: R$ .2lf\n",res5);
  41. }
  42.  
  43.  return 0;
  44.  
  45. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top