Question 1
#include <iostream>
Int main() {
Int x, y, sum;
// Assign values to x and y
X = 2;
Y = 3;
// Calculate the sum
Sum = x + y;
// Display the result
Std::cout << “Sum of x and y is: “ << sum << std::endl;
Return 0;
}
When you run this program, the output will be:
Sum of x and y is: 5
Question 2
, #include <iostream>
Using namespace std;
Int main() {
Int x, y, difference;
// Assign values to x and y
X = 10;
Y = 5;
// Calculate the difference
Difference = x – y;
// Display the result
Cout << “Difference between “ << x << “ and “ << y << “ is “ <<
difference << endl;
Return 0;
}
When you run this program, it will output:
Difference between 10 and 5 is 5
Question 3
#include <iostream>
Int main() {
Int x, y, sum;
// Assign values to x and y
X = 2;
Y = 3;
// Calculate the sum
Sum = x + y;
// Display the result
Std::cout << “Sum of x and y is: “ << sum << std::endl;
Return 0;
}
When you run this program, the output will be:
Sum of x and y is: 5
Question 2
, #include <iostream>
Using namespace std;
Int main() {
Int x, y, difference;
// Assign values to x and y
X = 10;
Y = 5;
// Calculate the difference
Difference = x – y;
// Display the result
Cout << “Difference between “ << x << “ and “ << y << “ is “ <<
difference << endl;
Return 0;
}
When you run this program, it will output:
Difference between 10 and 5 is 5
Question 3