C++

C++ Program to Add Two Numbers

#include <iostream>
using namespace std;  
main()
{
    int first, second, sumOfTwo;
    
    cout << "Enter two integers: ";
    cin >> first >> second;
    // sum of two numbers in stored in variable sumOfTwoNumbers
    sumOfTwo = first + second;
    // Prints sum 
    cout << first << " + " <<  second << " = " << sumOfTwo;     
    
}

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also

Close
Back to top button
Close
Close

Adblock Detected

Please consider supporting us by disabling your ad blocker