0

What is the program if output show this ? Pls help ayone

Enter a mark: 78 Enter a mark: 56 Enter a mark: 105 Invalid score. Enter a mark: 88 Enter a mark: -5 Invalid score. Enter a mark: 50 Enter a mark: 63 The number of marks below 50.0 is 0 The highest mark entered is 88 The lowest mark entered is 50

18th Jan 2021, 7:37 AM
Izzat Idham
Izzat Idham - avatar
2 Answers
+ 3
Izzat Idham Where is your attempts?
18th Jan 2021, 7:45 AM
A͢J
A͢J - avatar
+ 3
You can use multiple or nested "if" - "else if" - "else" statements. For example: int x = 5; if (x > 5) { .... cout << "larger" << endl; } else if (x < 5){ .... cout << "smaller" << endl; } else { .... cout << "equal" << endl; } - - - - - - - - - Logical operators may also help you with that program, such as &&. For example: if (x > 5 && x < 10) { cout << "in between 5 and 10" << endl; } Please show your attempt first next time. Or if you already have your attempt, please share with us so we may help. Thanks!
18th Jan 2021, 7:48 AM
noteve
noteve - avatar