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