Drop links or images here to add them to the editor.

Menu with Functions ⭐⭐

Create a program that simulates a basic calculator using an interactive menu. The program must process options using functions until the user chooses to exit.

Requirements:

  1. Use a do-while loop to keep the menu active.
  2. Use a switch statement to select the operation based on the input.
  3. Implement separate functions for: sumar (add), restar (subtract), and multiplicar (multiply).
  1. Sumar (Add)
  2. Restar (Subtract)
  3. Multiplicar (Multiply)
  4. Salir (Exit)

Input

A sequence of integers: first the menu option (1, 2, 3, or 4) and, for calculation options, the two integers to operate on. The program terminates with option 4.

Output

The result of each operation preceded by the text Resultado: . No output should be produced upon exiting.

Example

Input: 1 10 5 3 6 7 4

Output: Result: 15 Result: 42 `