Answer to Question #99413 in C++ for Caleb

Question #99413
Write an expression that will cause the following code to print "greater than 20" if the value of userAge is greater than 20.
1
Expert's answer
2019-12-10T10:23:46-0500
#include <iostream>

int main() {
    int userAge;
    std::cin >> userAge;
    if (userAge > 20) {
        std::cout << "greater than 20\n";
    }
    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