-
Notifications
You must be signed in to change notification settings - Fork 12
/
1131 - Grenais.cs
64 lines (51 loc) · 1.53 KB
/
1131 - Grenais.cs
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
using System;
//Developed by: @LucasMarcuzo
class URI1131 {
static void Main(string[] args) {
int x, y, i, g, e, s, grenais;
x=y=i=g=e=s=grenais=0;
do
{
string[] array = Console.ReadLine().Split(' ');
x=int.Parse(array[0]);
y=int.Parse(array[1]);
if(x > y)
{
i++;
grenais++;
}else if(y > x)
{
g++;
grenais++;
}else
{
e++;
grenais++;
}
Console.WriteLine("Novo grenal (1-sim 2-nao)");
s=int.Parse(Console.ReadLine());
} while (s == 1);
if (i > g)
{
Console.WriteLine("{0} grenais",grenais);
Console.WriteLine("Inter:{0}",i);
Console.WriteLine("Gremio:{0}",g);
Console.WriteLine("Empates:{0}",e);
Console.WriteLine("Inter venceu mais");
}else if (g > i)
{
Console.WriteLine("{0} grenais",grenais);
Console.WriteLine("Inter:{0}",i);
Console.WriteLine("Gremio:{0}",g);
Console.WriteLine("Empates:{0}",e);
Console.WriteLine("Gremio venceu mais");
}else
{
Console.WriteLine("{0} grenais",grenais);
Console.WriteLine("Inter:{0}",i);
Console.WriteLine("Gremio:{0}",g);
Console.WriteLine("Empates:{0}",e);
Console.WriteLine("Nao houve vencedor");
}
}
}