Skip to content

Instantly share code, notes, and snippets.

@b-adams
Created October 18, 2011 19:37
Show Gist options
  • Save b-adams/1296466 to your computer and use it in GitHub Desktop.
Save b-adams/1296466 to your computer and use it in GitHub Desktop.
Nesting versions
// This is the main function.
// program MAIN;
#include <stdio.h>
int main(void)
{
if(gamepoint<10)
{
printf("Strike!");
}
else
{
printf("All right! Keep it up!");
}
if (setpoint<14)
{
printf("Strike!");
}
else
{
printf("Nice! Can you really get it?");
}
if (12+gamePoint+setPoint<18)
{
printf("You...didn't get it, sorry. Better luck next time.");
}
else
{
printf("You did it! You got the gold trophy! Nice job!");
}
printf("Thanks for playing! Please take a small money prize for");
printf("taking part in it. Remember, victory is golden!");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment