C++ Program to Add Two Numbers

If you are looking to learn the topic of “C++ Program to Add Two Numbers” then you are in the perfect article. Let’s see the possibilities below.

C++ Program to Add Two Numbers

C++ Program to Add Two Numbers

Program Code

#include<iostream>
 
using namespace std;
 
int main()
{
int x,y,sum;
cout<<"Enter first no: ";
cin>>x;
cout<<"Enter second no: ";
cin>>y;
sum=x+y;
cout<<"nSum = "<<sum;
 
return 0;
}

Final Words

I hope this article helps you to learn “C++ Program to Add Two Numbers”. If you face any issues please let me know via the comment section. Share this article with other C/C++r developers via social networks.

Share on:

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Comment