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