Advertisement
shamiul93

1131

Jan 30th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. #include<stdio.h>
  2. main()
  3. {
  4.     int inter=0,gremio=0,i,g,x,draw=0,game=0;
  5.  
  6.     do
  7.     {
  8.         game++;
  9.         scanf("%d %d",&i,&g);
  10.         if(i>g)
  11.             inter++;
  12.         else if(i<g)
  13.             gremio++;
  14.         else
  15.             draw++;
  16.         printf("Novo grenal (1-sim 2-nao)\n");
  17.  
  18.         scanf("%d",&x);
  19.  
  20.  
  21.  
  22.     }while(x==1);
  23.  
  24.     if(inter>gremio)
  25.         printf("%d grenais\nInter:%d\nGremio:%d\nEmpates:%d\nInter venceu mais\n",game,inter,gremio,draw);
  26.     else if(inter<gremio)
  27.         printf("%d grenais\nInter:%d\nGremio:%d\nEmpates:%d\nGremio venceu mais\n",game,inter,gremio,draw);
  28.     else
  29.         printf("Nao houve vencedor\n");
  30.  
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement