When ELSEIF statement is used? Give an example.
Answers
Answered by
3
Answer:
Use an if/else statement if the two conditions are mutually exclusive meaning if one condition is true the other condition must be false. if (testScore > 60) cout << "You pass" << endl; if (testScore > 90) cout << "You did great" << endl; For example, before noon (AM) and after noon (PM) are mutually exclusive.
Answered by
0
Answer:
Use an if/else statement if the two conditions are mutually exclusive meaning if one condition is true the other condition must be false.
if (testScore > 60)
cout << "You pass" << endl;
if (testScore > 90)
cout << "You did great" << endl;
Similar questions
Social Sciences,
1 month ago
Economy,
3 months ago
Math,
3 months ago
Social Sciences,
9 months ago
India Languages,
9 months ago