Empowering CS learners, aspiring programmers, and startups with AI, Data Science & Programming insights — scaling skills from learning foundations to enterprise-grade solutions.
if (c == 'Y' || c == 'y')
{
printf("Agreed.\n");
}
else if (c == 'N' || c == 'n')
{
printf("Not agreed.\n");
}
[/dm_code_snippet]
This code from the first lecture appears loop but must not be a loop as mentioned “And if none of the expressions are true, nothing will happen since our program doesn’t have a loop.”
Could please anyone clarify what differentiates loop from the above code which is not a loop with if, else if. I do know there are three kinds of loop in C: