hey everyone,
writing a little program and i'm getting an error that says 'else without a previous if'.
am i leaving something out? do i need curly braces? the if is there; so i'm sure i've forgotten something..Code:
char ans_one, ans_two, ans_three, months_experience;
printf("Have you previously worked in a game store? (Y/N)\n");
scanf(" %c", &ans_one);
printf("Do you have any experience in sales? (Y/N)\n");
scanf(" %c", &ans_two);
if (ans_two == 'y')
printf("How many months of experience do you have? \n");
scanf(" %c", &months_experience);
else if (ans_two == 'n')
printf("Do you like video games? (Y/N)\n");
scanf(" %c", &ans_three);
else if (ans_two == 'n')
printf("Do you like video games? (Y/N)\n");
scanf(" %c", &ans_three);
thanks