Answer to Question #303176 in C++ for Bravoo

Question #303176

Create a program that will display a different output based on the user input. If the user entered a number more than 50, it will display "The number is greater than 50". Otherwise, it will display "The number is lesser than what I expected."

1
Expert's answer
2022-02-27T04:12:13-0500
#include <iostream>

using namespace std;

int main()
{
	double val;
	cout << "Please, enter a value: ";
	cin >> val;
	if(val>50)
		cout << "The number is greater than 50: ";
	else
		cout << "The number is lesser than what I expected";
}

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