-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbeecrowd1131.cpp
More file actions
68 lines (66 loc) · 1.43 KB
/
beecrowd1131.cpp
File metadata and controls
68 lines (66 loc) · 1.43 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/**
* @file beecrowd1131.cpp
* see the problem - https://prnt.sc/3qLNguiEhSBK
* @author Md. Alamin (alamin5g@yahoo.com)
* I would love be a software engineer at Google. That is why anybody can uses this code without any condition, if you face any difficulty, then try to email me.
* @version 0.1
* @date 2022-06-30
*
* @copyright Copyright (c) 2022
*
*/
#include <bits/stdc++.h>
using namespace std;
int main()
{
int in, gr, chose, match = 1, inter = 0, gremio = 0, draw = 0;
cin >> in >> gr;
cout << "Novo grenal (1-sim 2-nao)" << endl;
cin >> chose;
if (in > gr)
{
inter++;
}
else
{
gremio++;
}
while (chose != 2)
{
cin >> in >> gr;
cout << "Novo grenal (1-sim 2-nao)" << endl;
cin >> chose;
if (in > gr)
{
inter++;
}
else if (in == gr)
{
draw++;
}
else
{
gremio++;
}
match++;
in = 0;
gr = 0;
}
cout << match << " grenais" << endl;
cout << "Inter:" << inter << endl;
cout << "Gremio:" << gremio << endl;
cout << "Empates:" << draw << endl;
if (inter == gremio)
{
cout << "Não houve vencedor" << endl;
}
else if (inter > gremio)
{
cout << "Inter venceu mais" << endl;
}
else if (gremio > inter)
{
cout << "Gremio venceu mais" << endl;
}
return 0;
}