public
anonymous / gist:3830914
Created

  • Download Gist
gistfile1.txt
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
#include <stdio.h>
int main ()
{
int Geneseorecord = 0;
int Opponentrecord = 0;
int Ties=0;
int GS, OS; //GS= Geneseo's score
int i,n; //n = the number of games in the season
 
printf(" Enter the number of games in the season: \n");
scanf("%d", &n);
while(i=0;i<n;i++)
 
{
printf("enter the score for game %d with geneseo's first \n", i+1);
scanf("%d %d", &GS, &OS);
 
 
 
if (GS>OS)
{
Geneseorecord=Geneseorecord+1; //this add 1 to the Geneseo record
 
}
if (GS<OS)
{
Opponentrecord=Opponentrecord+1;
 
}
if (GS=OS)
{
Ties=Ties+1;
}
 
printf("number of Wins for Geneseo:%d\n",Geneseorecord);
printf("number of Loses for Geneseo:%d\n",Opponentrecord);
printf("number of Ties for Geneseo:%d\n",Ties);
}
 
if (Opponentrecord=0)
{
printf("Congratulations Geneseo has not lost a game this season");
}
 
 
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.