Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main ()
- {
- int n,m,x,Inter=0,Gremio=0,Empates=0,grenais=0;
- while(1)
- {
- scanf("%d %d",&m,&n);
- printf("Novo grenal (1-sim 2-nao)\n");
- grenais++;
- if(m>n)
- {
- Inter++;
- }
- else if(m<n)
- {
- Gremio++;
- }
- else
- {
- Empates++;
- }
- scanf("%d",&x);
- if(x==1)
- {
- continue;
- }
- else
- {
- break;
- }
- }
- printf("%d grenais\n",grenais);
- printf("Inter:%d\n",Inter);
- ptintf("Gremio:%d\n",Gremio);
- printf("Empates:%d\n",Empates);
- if(Inter>Gremio)
- {
- printf("Inter venceu mais\n");
- }
- else if(Inter<Gremio)
- {
- printf("Gremio venceu mais\n");
- }
- else
- {
- printf("Nao houve vencedor\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement