I understand that else statements should not have a semicolon at the end of the if statement.
The objective is to make this if/else statement work, so that if the answer is not Y or y, then to print the else statement. My question is:
- What exactly needs to be done to correct this?
Here's the code:
if (answer=='Y'|| 'y')
scanf(" c", &answer);
printf("\n Great! Keep listening to music. I'm sure your mood will improve.");
else printf("\n Try listening to some music that you enjoy!");
}