subject

(Calculator Using Function Pointers) Using the techniques you learned in Fig. 7.28, create a text-based, menu-driven program that
allows the user to choose whether to add, subtract, multiply or divide two numbers. The
program should then input two double values from the user, perform the appropriate
calculation and display the result. Use an array of function pointers in which each pointer
represents a function that returns void and receives two double parameters. The corresponding
functions should each display messages indicating which calculation was performed, the values
of the parameters and the result of the calculation. In both cases, display the value to 2
digits of precision.
Note: do not accept invalid menu selections, print an error message and ask the user to try
again. Furthermore, if the user chooses division but enters 0 as the divisor, do not accept the
entry, print an error message and ask the user to enter another number instead.
===·Calculator·Menu·===↵

Please·select·from·the·options·belo w:↵

(0)·Add·a·number·to·another.↵
(1)·Subtract·a·number·from·another. ↵
(2)·Multiply·a·number·to·another.↵< br /> (3)·Divide·a·number·by·another.↵

Enter·your·selection:-1↵
·Invalid·selection!↵
Enter·your·selection:3↵
·Enter·a·number:25.00↵
·Enter·another·number:0.00↵
·Error:·attempting·to·divide·by·zer o!↵
Enter·another·number:0.05↵
·Dividing·25.00·by·0.05...↵
The·result·is:·500.00↵

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:30
Kto rozmawia z clamentain przez krótkofalówke w the walking dead która śledzi lee w 4 epizodzie
Answers: 1
question
Computers and Technology, 22.06.2019 19:20
Amedian in the road will be marked with a white sign that has a black arrow going to the left of the median. true false
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Jason needs to learn a new web tool. he went through his books to understand more about it. now he wants hands-on experience with using that tool. what would him? jason can use websites where workspace is provided to test the results of your code.
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
You know the right answer?
(Calculator Using Function Pointers) Using the techniques you learned in Fig. 7.28, create a text-b...
Questions
question
World Languages, 03.12.2020 14:10
question
Social Studies, 03.12.2020 14:10
question
Physics, 03.12.2020 14:10
question
Biology, 03.12.2020 14:10
Questions on the website: 13722362