#include<stdio.h>
#include<string.h>
int main(){
//Declaração de Variáveis
char jogo;
char times[20][15] = {"Corinthians", "Atlético-MG", "Grêmio", "Santos", "São Paulo", "Internacional", "Sport", "Palmeiras", "Ponte Preta", "Flamengo",
"Cruzeiro", "Atlético-PR", "Fluminense", "Chapecoense", "Figueirense", "Havaí", "Coritiba", "Goias", "Joinville" ,"Vasco da Gama"};
int pontos[20] = {70, 62, 56, 50, 50, 50, 49, 48, 47, 44, 44, 42, 40, 39, 35, 34, 33, 31, 30, 30};
int menu=0, opcao, realpos = 0, i = 0;
//Entrada de dados
while ((menu > 0) && (menu<3)) {
switch (menu) {
case 1: printf("+----BRASILEIRAO 2015---+"); for (i = 0; i < 20; i++) {
printf("%d - %s - %d", i
+ 1, times
[i
], pontos
[i
]); }
menu = 666;
break;
case 2:
printf("Digite o a posição do time que deseja simular");
for (i = 1; i <= 8; i++){
realpos = opcao - 1;
printf("Digite o resultado do %dº jogo do %s. (V, E ou D)", i
, times
[realpos
]); switch (jogo) {
case 'V':
pontos[realpos] += 3;
break;
case 'E':
pontos[realpos]++;
break;
case 'D':
break;
default:
printf("Digite o resultado do %dº jogo do %s. V, E ou D)", i
, times
[realpos
]); break;
}
}
for (i = 0; i < 20; i++) {
printf("%d - %s - %d", (i
+1), times
[i
], pontos
[i
]); }
break;
}
}
return 0;
}
I2luY2x1ZGU8c3RkaW8uaD4KI2luY2x1ZGU8c3RyaW5nLmg+CmludCBtYWluKCl7CgkvL0RlY2xhcmHDp8OjbyBkZSBWYXJpw6F2ZWlzCgljaGFyIGpvZ287CgljaGFyIHRpbWVzWzIwXVsxNV0gPSB7IkNvcmludGhpYW5zIiwgIkF0bMOpdGljby1NRyIsICJHcsOqbWlvIiwgIlNhbnRvcyIsICJTw6NvIFBhdWxvIiwgIkludGVybmFjaW9uYWwiLCAiU3BvcnQiLCAiUGFsbWVpcmFzIiwgIlBvbnRlIFByZXRhIiwgIkZsYW1lbmdvIiwKCSJDcnV6ZWlybyIsICJBdGzD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