Programming code using C++ that will add two numbers.
> C++
> It is one of the most popularly used programming language. It is a sophisticated, efficient and general purpose programming language used by many programmers all over the world.
Many of today's Operating System (OS), drivers, browsers and games are developed using C++.
> C++ includes several operators such as comparison, arithmetic, bit manipulation and logical operators. The language also facilitates declaration of user defined classes.
#include <iostream>
using namespace std;
int addition(int a, int b);
int main ()
{
int num1;
int num2;
int addition;
Cout<<"Enter first number :";
Cin>>num1;
Cout<<"Enter second number :";
Cin>>num2;
add=addition (num1, num2);
Cout<<"Addition is: "<<add<<endln;
return 0;
}
#include <iostream>
using namespace std;
int main ()
{
int a, b, sum of two numbers
Cout<<"Enter two integers :";
Cin>> a >> b;
sum of two numbers = a + b;
Cout<< a << " + " << b <<" = "<<sum of two numbers;
return 0;
}
Always visit sharpestarena.com for more C++, Python, PhP, and other programming language.
We provide C++ codes that will help you through your project on how to build your website.
C++ code can be run on your computer or mobile phone with Notepad.
It can also be run in your site building, like dashboard, control panel or database, where you edit your website.
0 Comments