Write a program add two number in c++
Answers
Answered by
11
Answer:
#include <iostream>
using namespace std;
int main()
{
int firstNumber, secondNumber, sumOfTwoNumbers;
cout << "Enter two integers: ";
cin >> firstNumber >> secondNumber;
// sum of two numbers in stored in variable sumOfTwoNumbers
sumOfTwoNumbers = firstNumber + secondNumber;
// Prints sum
cout << firstNumber << " + " << secondNumber << " = " << sumOfTwoNumbers;
return 0;
}
Similar questions
Biology,
3 months ago
Social Sciences,
3 months ago
English,
3 months ago
Math,
10 months ago
Business Studies,
10 months ago