mcqs bucket

  • MCQs Bucket | Program Write a Program in C++ that takes two numbers from user and Add them.

    mcqsbucket

      Best guide for exams of all nature, Competitive exams and Interviews

Write a Program in C++ that takes two numbers from user and Add them.

	 
                                 		#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;
}