int main()
{
int age;
cout<< "enter your age; ";
cin >> age;
cin.ignore();
if (age <100) {
cout<< "true\n";
}
elseif (age>100) {
cout<< "false\n";
}
elseif (age == 100); {
cout<<"unknown\n";
}
cin.get();
}
When the either the 'if' or the first 'else if' statement is parsed
the output indicates the second 'else if' statement is also parsed
and the output is shown as 'true / unknown' or ' false / unknown'
I don't understand why the second 'else if' statement is also parsed
when the user input simply meets the 'if' or the first 'else if'
requirement.