Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main ()
- {
- int CobrancaTime_1, CobrancaTime_2, GolTime_1, GolTime_2, ErroTime_1, ErroTime_2, ContGol_1, ContGol_2, ContErro_1, ContErro_2, soma1, soma2, Cont_1, Cont_2, a, b, c, d;
- int n1, n2;
- GolTime_1 = 0;
- GolTime_2 = 0;
- ErroTime_1 = 0;
- ErroTime_2 = 0;
- ContGol_1 = 0;
- ContGol_2 = 0;
- ContErro_1 = 0;
- ContErro_2 = 0;
- soma1 = 0;
- soma2 = 0;
- Cont_1 = 0;
- Cont_2 = 0;
- c = 1;
- for(a = 1; a <= 10; a++)
- {
- if((ContGol_1 + 3 != ContGol_2)&&(ContGol_2 + 3 != ContGol_1))
- {
- if(a % 2 != 0)
- {
- scanf("%d", &CobrancaTime_1);
- if(CobrancaTime_1 == 1)
- {
- ContGol_1++;
- }else
- {
- ErroTime_1++;
- }
- }else if(a % 2 == 0)
- {
- scanf("%d", &CobrancaTime_2);
- if(CobrancaTime_2 == 1)
- {
- ContGol_2++;
- }else
- {
- ErroTime_2++;
- }
- }
- }
- }
- soma1 = GolTime_1 - ErroTime_1;
- soma2 = GolTime_2 - ErroTime_2;
- if(soma1 > soma2)
- {
- printf("COMPUTACAO.RAR");
- }else if(soma2>soma1)
- {
- printf("EDUCACAO FISICA");
- }else if(soma1 == soma2)
- {
- while(c != 0)
- {
- d++;
- if(d % 2 != 0)
- {
- scanf("%d", &c);
- if(c == 1)
- {
- Cont_1++;
- }else
- {
- n1 = 0;
- }
- }else if(d % 2 == 0)
- {
- scanf("%d", &c);
- if(c == 1)
- {
- Cont_2++;
- }else
- {
- n2 = 0;
- }
- }
- }
- if(Cont_1>Cont_2)
- {
- printf("COMPUTACAO.RAR");
- }else
- {
- printf("EDUCACAO FISICA");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement