Complete the following program so that it inputs 2 integers from the console, an
ID: 3527837 • Letter: C
Question
Complete the following program so that it inputs 2 integers from the console, and then outputs the first number, the second number, and the sum, each on a line by itself. For example, if the input is 10 20 Then the output from your program should be *exactly* 10 20 30 Instructor's notes: Most of the program has already been written for you --- replace the ??? you see with appropraite C++ statements. #include using namespace std; int main() { int x; int y; int sum; // input x and y: ??? // compute sum: ??? // output x, y, and sum, each on their own line: cout << x << endl; cout << y << endl; cout << sum << endl; return 0; }Explanation / Answer
#include using namespace std; int main() { int x; int y; int sum; // input x and y: ??? cin>>x>>y; // compute sum: ??? sum=x+y; // output x, y, and sum, each on their own line: coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.