Write a C++ Program to Add Two Numbers

By | 23.12.2016

Add Two Numbers

Write a C++ Program to C++ Program to Add Two Numbers. Here’s simple Program to Add Two Numbers in C++ Programming Language.

In this program, user is asked to enter two integers. Then, the sum of those two integers is stored in a variable and displayed on the screen.

Here is source code of the C++ Program to Add Two Numbers. The C++ program is successfully compiled and run(on Codeblocks) on a Windows system. The program output is also shown in below.


/*  C++ Program to Addition of Two Numbers  */

#include <iostream>
using namespace std;

int main()
    int first, second, sum;

    cout << "Enter 1st integer :: ";
    cin >> first;
    cout << "\nEnter 2nd integer :: ";
    cin >> second;

    sum = first + second;

    cout<<"\nSum of Two Numbers [ "<<first<<" + "<<second<<" ] = "<<sum<<"\n";

    return 0;

Output : :

/*  C++ Program to Addition of Two Numbers  */

Enter 1st integer :: 11

Enter 2nd integer :: 65

Sum of Two Numbers [ 11 + 65 ] = 76

Process returned 0

Above is the source code for C++ Program to Add Two Numbers which is successfully compiled and run on Windows System.The Output of the program is shown above .

If you found any error or any queries related to the above program or any questions or reviews , you wanna to ask from us ,you may Contact Us through our contact Page or you can also comment below in the comment section.We will try our best to reach up to you in short interval.

Thanks for reading the post….

4.4 12 votes
Article Rating
Category: Basic Programs C++ Programming

About Tunde A

My name is Tunde Ajetomobi, a Tech Enthusiast and Growth Hacker. I enjoy creating helpful content that solves problem across different topics. Codezclub is my way of helping young aspiring programmers and students to hone their skills and find solutions on fundamental programming languages.

Notify of

Newest Most Voted
Inline Feedbacks
View all comments

light theme please


can you please help me write a program for an event