-
Notifications
You must be signed in to change notification settings - Fork 38
/
1131.cpp
38 lines (29 loc) · 909 Bytes
/
1131.cpp
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
#include <iostream>
using namespace std;
int main(){
int x, y;
int op;
int inter = 0;
int gremio = 0;
int grenal = 0;
int empate = 0;
while(true){
cin >> x;
cin >> y;
if(x > y) inter ++;
if(x < y) gremio ++;
if(x == y) empate++;
grenal++;
cout << "Novo grenal (1-sim 2-nao)\n";
cin >> op;
if(op == 2) break;
}
cout << grenal <<" grenais\n";
cout << "Inter:" << inter << "\n";
cout << "Gremio:" << gremio << "\n";
cout << "Empates:" << empate << "\n";
if(inter > gremio) cout << "Inter venceu mais\n";
if(inter < gremio) cout << "Gremio venceu mais\n";
if(inter == gremio) cout << "Nao houve vencedor\n";
return 0;
}