here's a C++ program that asks the user to enter two numbers, calculates their sum, difference, and product, and then prints each of the results in separate lines:#include <iostream>using namespace std;int main() { // Declare variables to store the two numbers int num1, num2; // Prompt the user to enter the first number cout << "Enter the first number: "; cin >> num1; ...
Showing posts with label calculate and display their sum. Show all posts
Showing posts with label calculate and display their sum. Show all posts
Friday, March 10, 2023
Write a C++ program that ask user to enter two numbers, calculate and display their sum, difference and product. Print each of the results in separate lines.
Niraj shrestha
March 10, 2023
0