MRK - Spring 2024 - CS201 - 1 - BC230414368
MRK - Spring 2024 - CS201 - 1 - BC230414368
#include <iostream>
int main() {
int choice;
do {
// Display menu
switch (choice) {
case 1: { // Addition
int numAdd;
int sum = 0;
int num;
sum += num;
break;
case 2: { // Subtraction
int numSub;
int result;
int num;
result -= num;
}
cout << "Result: " << result << endl;
break;
return 0;
The output of the program is a simple menu-based calculator that allows the user to perform
basic arithmetic operations like addition, subtraction, multiplication, and division. The program
displays the menu and prompts the user to enter their choice. Based on the selected operation,
the program asks for input (numbers to perform the operation on) and displays the result of the
operation. This process continues until the user chooses to exit the program.