Skip to content

anonymous /gist:3830914

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
#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");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.