Answers for "https://www.programiz.com/cpp-programming/examples/add-numbers"

0

https://www.programiz.com/cpp-programming/examples/add-numbers

#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;
}
Posted by: Guest on June-01-2021

Code answers related to "https://www.programiz.com/cpp-programming/examples/add-numbers"

Browse Popular Code Answers by Language