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
Science,
2 months ago
Business Studies,
2 months ago
Economy,
4 months ago
Math,
4 months ago
Social Sciences,
10 months ago
India Languages,
10 months ago