Write a console program (character-based) to perform simple calculations (addition, subtraction, multiplication, and division) of two numbers using your understanding of control flow, input validations, and error conditions in C.
Description:
You need to write a program that, when run, will display a menu. The menu gives five choices of operations: addition, subtraction, multiplication, division, and an option to exit the program. It then prompts the user to make a choice of calculation they want to perform. Once the user selects the operation, it will check for valid menu choices (and give an appropriate message if a wrong choice was selected) and then prompt to enter two numbers separated by a space. If the user entered valid numbers, it will perform the desired operation and display the result. If the user input is not valid, it will display an error message and ask for the correct input. At the end of the result, it gives a prompt "Press enter key to continue....". Once the enter key is pressed, it displays the menu again. The program repeats until the user selects the choice to exit.