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