-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1131.cpp
More file actions
33 lines (28 loc) · 728 Bytes
/
Copy path1131.cpp
File metadata and controls
33 lines (28 loc) · 728 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
#include<bits/stdc++.h>
using namespace std;
int main(){
int inter = 0, grem = 0, par = 1, empa = 0;
while(true){
int g, i,n;
scanf("%d %d",&i,&g);
printf("Novo grenal (1-sim 2-nao)\n");
scanf("%d",&n);
if(g == i)
empa++;
else if(i > g)
inter++;
else
grem++;
if(n == 2)
break;
par++;
}
printf("%d grenais\nInter:%d\nGremio:%d\nEmpates:%d\n",par,inter,grem,empa);
if(inter > grem)
printf("Inter venceu mais\n");
else if(inter < grem)
printf("Gremio venceu mais\n");
else
printf("Nao houve vencedor\n");
return 0;
}