76 255
Assignments Done
Successfully Done
In May 2019

Answer to Question #4504 in C++ for Scott

Question #4504
How do I write a program prompting the user for two inputs, where the inputs must be added together along with branching code to determine whether or not the answer is above 50. Below 50 will indicate that the number is 'too low' and above 50 will indicate that the number is 'too high'.
Expert's answer
#include <iostream>
using namespace std;
int a,b,c;
cout<<"Please, enter a number:"\r\n;
cout<<"Please, enter one more number:"\r\n;
c = a+b;
if (c<50) cout<<"too low"<<\r\n;
if (c>50) cout<<"too high"<<\r\n;

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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions