Code:
#include <stdio.h>
int main()
{
char answer = 0;
printf ("Are you a Miami Dolphins fan Y/N?\n");
scanf("%c", &answer);
getchar();
while (answer != 'y' && answer != 'n')
{
printf ("Invalid input, please enter Y/N:\n");
scanf("%c", &answer);
getchar();
}
if (answer == 'y')
{
printf ("Good choice they will be Super Bowl Champs in 2010\n");
}
else if (answer == 'n')
{
printf ("As long as your not a Jets fan you're all right by me\n");
}
return 0;
}
Got it, does anyone know where I can get some simple program ideas for practice?