You are hired by a software company to write a C++ console which will work as a simple calculator. This program can take two numbers from the user and calculate the summation, subtraction, multiplication, division and modulus of two numbers. First, prompt the user to take two numbers from the user. Define a function takeInput() which is called from main function to take the input. After taking the input, user can select an option by entering any of the character: s- summation k- subtraction m- multiplication d- division p- modulus otherwise- program shows enter a valid input You can define a function void Menu() to control the input. You should define a switch case for controlling the options. For each option, you have to create five different function which will give you summation, subtraction, multiplication, division and modulus of two numbers.
You are hired by a software company to write a C++ console which will work as a simple calculator. This program can take two numbers from the user and calculate the summation, subtraction, multiplication, division and modulus of two numbers.
First, prompt the user to take two numbers from the user. Define a function takeInput() which is called from main function to take the input.
After taking the input, user can select an option by entering any of the character:
s- summation
k- subtraction
m- multiplication
d- division
p- modulus
otherwise- program shows enter a valid input
You can define a function void Menu() to control the input. You should define a switch case for controlling the options.
For each option, you have to create five different function which will give you summation, subtraction, multiplication, division and modulus of two numbers.
Step by step
Solved in 3 steps with 6 images