Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- main()
- {
- int alc=0,gas=0,dis=0,x;
- while(scanf("%d",&x))
- {
- if(x==1)
- alc++;
- else if(x==2)
- gas++;
- else if(x==3)
- dis++;
- else if(x==4)
- break;
- }
- printf("MUITO OBRIGADO\nAlcool: %d\nGasolina: %d\nDiesel: %d\n",alc,gas,dis);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement