Solution to Create a program that will display a different output based on the user input. If … - Sikademy
Author Image

Archangel Macsika

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.'

The Answer to the Question
is below this banner.

Can't find a solution anywhere?

NEED A FAST ANSWER TO ANY QUESTION OR ASSIGNMENT?

Get the Answers Now!

You will get a detailed answer to your question or assignment in the shortest time possible.

Here's the Solution to this Question


#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"; }

Related Answers

Was this answer helpful?

Join our Community to stay in the know

Get updates for similar and other helpful Answers

Question ID: mtid-3-stid-44-sqid-1081-qpid-77