#include #include using namespace std; int main() { float op1; float op2; float result; int c; cout...
Fantastic news! We've Found the answer you've been seeking!
Question:
#include
using namespace std;
int main() {
float op1;
float op2;
float result;
int c;
cout << "please type in your choice - 1 to add, 2 to subtract, 3 to multiply, 4 to divide, 5 for timestable: ";
cin >> c;
switch (c) {
case 1:
float num1;
float num2;
cout << "Enter first number: ";
cin >> num1;
cout << "Enter second number:";
cin >> num2;
cout << "Result is " << num1 + num2;
case 2:
num1;
num2;
cout << "Enter first number: ";
cin >> num1;
cout << "Enter second number:";
cin >> num2;
cout << "Result is " << num1 - num2;
case 3:
num1;
num2;
cout << "Enter first number: ";
cin >> num1;
cout << "Enter second number:";
cin >> num2;
cout << "Result is " << num1 * num2;
case 4:
num1;
num2;
cout << "Enter first number: ";
cin >> num1;
cout << "Enter second number:";
cin >> num2;
cout << "Result is " << num1 * num2;
case 5:
const int fixed = 20;
num1;
num2;
cout << "Enter first number: ";
cin >> num1;
for (int i = 1; i < fixed + 1 ; i++) {
cout << num1 * i << " ";
cout << endl;
}
}
return 0;
}
Related Book For
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell
Posted Date: