Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- int main()
- {
- int x,y;
- scanf("%d %d",&x,&y);
- double res1=4.00*y;
- double res2=4.50*y;
- double res3=5.00*y;
- double res4=2.00*y;
- double res5=1.50*y;
- if(x==1){
- printf("Total: R$ %.2lf\n",res1);
- }
- else if(x==2){
- printf("Total: R$ %.2lf\n",res2);
- }
- else if(x==3){
- printf("Total: R$ %.2lf\n",res3);
- }
- else if(x==4){
- printf("Total: R$ %.2lf\n",res4);
- }
- else{
- printf("Total: R$ .2lf\n",res5);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement