-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path1131.cpp
More file actions
44 lines (32 loc) · 821 Bytes
/
1131.cpp
File metadata and controls
44 lines (32 loc) · 821 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
36
37
38
39
40
41
42
43
44
#include <bits/stdc++.h>
using namespace std;
int main(){
int grenais, inter, gremio, draws;
grenais = inter = gremio = draws = 0;
while(true){
int i, g, ans;
cin >> i >> g;
cout << "Novo grenal (1-sim 2-nao)\n";
cin >> ans;
if(i > g)
inter++;
else if(g > i)
gremio++;
else
draws++;
grenais++;
if(ans == 2)
break;
}
printf("%d grenais\n", grenais);
printf("Inter:%d\n", inter);
printf("Gremio:%d\n", gremio);
printf("Empates:%d\n", draws);
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;
}