Answer to Question #99418 in C++ for Caleb

Question #99418
Write an if-else statement that checks patronAge. If 55 or greater, print "Senior citizen", otherwise print "Not senior citizen" (without quotes). End with newline.

#include <iostream>
using namespace std;

int main() {
int patronAge;

cin >> patronAge;

/* Your solution goes here */

return 0;
}
1
Expert's answer
2019-12-05T10:33:53-0500

#include <iostream>

using namespace std;

int main() {

int patronAge;

cin >> patronAge;

if (patronAge>55) cout << “Senior citizen” <<endl;

else cout << “Not senior citizen” << endl;


return 0;

}



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS