Write a C+. Program to ADD two numbers using nt and n2 variable
where nt can store 103 value and n2 can store 301 value. Print both the
numbers and the TOTAL.
Answers
Answered by
0
Answer:
C++ Program to Add Two Numbers
In this program, user is asked to enter two integers. Then, the sum of those two integers is stored in a variable and displayed on the screen. Primary tabs
#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;
Enter two integers: 4
5
4 + 5 = 9
Explanation:
I hope it helps you please mark me as Brainlist and do follow
Similar questions
Geography,
1 month ago
Math,
1 month ago
Political Science,
1 month ago
Math,
2 months ago
Social Sciences,
2 months ago
Math,
9 months ago
World Languages,
9 months ago