-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path1131.c
More file actions
35 lines (24 loc) · 652 Bytes
/
1131.c
File metadata and controls
35 lines (24 loc) · 652 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <stdio.h>
int main(){
int g, i, contG = 0, contI = 0, resp, cont = 0, emp = 0;
do{
scanf("%d %d", &i, &g);
if(g == i){
emp++;
}else if(g > i){
contG++;
}else{
contI++;
}
cont++;
printf("Novo grenal (1-sim 2-nao)\n");
scanf("%d", &resp);
}while(resp == 1);
printf("%d grenais\n", cont);
printf("Inter:%d\n", contI);
printf("Gremio:%d\n", contG);
printf("Empates:%d\n", emp);
if(contG > contI){printf("Gremio venceu mais\n");}
else if(contI > contG){printf("Inter venceu mais\n");}
return 0;
}