It performs basic four mathematical operations (addition, subtraction, multiplication, and division) depending on the user’s choice, use the ‘switch’ case to identify the input operator to perform required calculation then display the result as shown here in the following program.