Ad

Create a simple calculator and pass all the tests. The choice, x, and y are all given to you as ints. Just figure out how to fix the rest.

#include <iostream>
using namespace std;

string die() {
  return "Invalid Input!";
}

string Calculator(int choice, int x, int y) {
    cout << "Welcome to simple calculator!\n";
    cout << "1. Addition\n2. Subtraction\n3. Multiplication\n4. Division\n5. Modulus\n";
    // YOU: Write code to finish this program (Input is given, don't use cin)
    // Instead of cout << x + y << endl; for example, do return (x + y);
    // You can call the die function with die();
}