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'.
1
Expert's answer
2011-10-11T08:01:03-0400
#include <iostream> using namespace std; main(){ int a,b,c; cout<<"Please, enter a number:"\r\n; cin>>a; cout<<"Please, enter one more number:"\r\n; cin>>b; c = a+b; if (c<50) cout<<"too low"<<\r\n; if (c>50) cout<<"too high"<<\r\n; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment