C++ Program to Add Two Numbers

In this program, we will learn to how to add integer numbers. Here we have declared three variable num1, num2 and sum. The addition of two variables is stored in sum variable.

Source Code
#include <iostream>
using namespace std;
int main()
    int num1, num2, sum;
    num1 = 12;
    num2 = 23;
    sum = num1 + num2;
    cout<<"Addition of "<<num1<<" and "<<num2<<" is "<<sum;
    return 0;
Addition of 12 and 23 is 35