#include "iostream"
using namespace std;
void main() {
int first_number, second_number, sum_of_two_number;
cout << "Enter the first integers: ";
cin >> first_number ;
cout << "Enter the second integers: " ;
// sum of two numbers in stored in variable sum_of_two_numbers
sum_of_two_number = first_number + second_number;
// Prints sum
cout << first_number << " + " << second_number << " = " << sum_of_two_number ;
}
Output
using namespace std;
void main() {
int first_number, second_number, sum_of_two_number;
cout << "Enter the first integers: ";
cin >> first_number ;
cout << "Enter the second integers: " ;
// sum of two numbers in stored in variable sum_of_two_numbers
sum_of_two_number = first_number + second_number;
// Prints sum
cout << first_number << " + " << second_number << " = " << sum_of_two_number ;
}
Enter the first integer: 2
Enter the second integer: 4
2 + 4 = 6
Enter the second integer: 4
2 + 4 = 6
0 Comments
if you have any doubt in programming concept please let me know