Smipple is shutting down Nov 30, 2017. Some features are currently disabled.
Profile image for Alex Jose Silva alexjosesilva
uri onlie 1134
Language
Text only
Tags
C URI

1134v3

1 #include <stdio.h> 2 3 int main() { 4 5 int num,contA=0,contG=0,contD=0; 6 7 do{ 8 scanf("%i",&num); 9 if(num==1){contA++;} 10 else if(num==2){contG++;} 11 else if(num==3){contD++;} 12 }while(num!=4); 13 14 printf("MUITO OBRIGADO\n"); 15 printf("Alcool: %i\n",contA); 16 printf("Gasolina: %i\n",contG); 17 printf("Diesel: %i\n",contD); 18 19 return 0; 20 }

Comments