Computer Science, asked by syedmdsaif827, 1 year ago

write an c++ program to find sum of two variables using third variables

Answers

Answered by VikasM9
0

#include <iostream>

using namespace std;

 int main()

{

   int firstNumber, secondNumber, sumOfTwoNumbers;

  cout << "Enter two number to be added: ";

   cin >> firstNumber >> secondNumber;

   // sum of two numbers in stored in variable sumOfTwoNumbers

  sumOfTwoNumbers = firstNumber + secondNumber;

  // Print the sum  of two numbers

   cout << firstNumber << " + " <<  secondNumber << " = " << sumOfTwoNumbers;      

   return 0;

}

Similar questions