Answer to Question #317346 in C++ for Quileto

Question #317346
  1. Input two integers (one per line) and make sure to store them in variables.
  2. Add the two integers and print out their sum!
1
Expert's answer
2022-03-24T07:49:26-0400
#include <iostream>
using namespace std;
 
int main() {
 int num1, num2, sum;
 
 cout<<"Number_1: ";
 cin>> num1;
 
 cout<<"Number_2: ";
 cin>> num2;
    
 sum = num1+num2;
 cout<<"Sum = "<<sum<<endl;
 
  return 0;
}

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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog