A program that asks the user for two numbers and then displays the sum of those numbers.
//A program that asks the user to two and displays the result
#include <iostream>
using namespace std;
int main ()
{
int number1;//variable to store the first number
int number2;//variable to store the second numnber
//Asks the user to enter integer numbers
cout << "Please enter the first integer number: ";
cin >> number1;// takes the first number from the user
cout << "Please enter the seoond integer number: ";
cin >> number2;//takes the second number from the user
cout << endl;//creates a space
//displays the sum of two numbers
cout << "The sum is equals to " << number1+number2;
return 0;
}
//A program that asks the user to two and displays the result
#include <iostream>
using namespace std;
int main ()
{
int number1;//variable to store the first number
int number2;//variable to store the second numnber
//Asks the user to enter integer numbers
cout << "Please enter the first integer number: ";
cin >> number1;// takes the first number from the user
cout << "Please enter the seoond integer number: ";
cin >> number2;//takes the second number from the user
cout << endl;//creates a space
//displays the sum of two numbers
cout << "The sum is equals to " << number1+number2;
return 0;
}