addition
//Write a c++ program to perform addition of two given numbers?
#include <iostream>
using namespace std;
int main()
{
int Num1,Num2,sum;
cout << "Enter two integers: ";
cin >>Num1>>Num2;
// sum of two numbers is stored in variable sum
sum=Num1+Num2;
// Prints sum
cout <<Num1<<" + "<<Num2<<" = "<<sum;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int Num1,Num2,sum;
cout << "Enter two integers: ";
cin >>Num1>>Num2;
// sum of two numbers is stored in variable sum
sum=Num1+Num2;
// Prints sum
cout <<Num1<<" + "<<Num2<<" = "<<sum;
return 0;
}
Comments
Post a Comment