Question: What is wrong with my answer? It needs to be in C++ format and I'm using the website vocareum to do this. Here is the

What is wrong with my answer? It needs to be in C++ format and I'm using the website vocareum to do this.

Here is the question:

Ask the user for an integer. If the number entered is greater than 50, then respond in a certain way, otherwise respond in another way. For example:

Please enter an integer: 100 You entered 100, which is greater than 50. 

and here is my answer:

#include #include

int main(){ //Declare a variable to take input int num; //Prompt the user for input; cout<" Enter a number: "; cin>num; return 0; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!