Question: As we continue with our study of programming fundamentals, here is a short extra credit programming challenge involving selection control structures. To be specific, the

As we continue with our study of programming fundamentals, here is a short extra credit programming challenge involving selection control structures. To be specific, the program specifications below and the algorithm you develop and write will involve the set-up and use of either nested if-else statements and/or switch statements. Choose one of the following programming challenges below for this algorithm workbench extra credit programming challenge ------------------------------------------------------------------------------------------- Finding median Use selection control structures to write a C++ program that determines the median of three input numbers. The median is the middle number when the three numbers are arranged in order by size. However, the user can input the values in any order, so your program must determine which value is between the other two. For example, given an appropriate prompt, if the user enters three "unique" real numbers here is a sample of the console program output... Sample screen output 1 using Code:Blocks: Please enter three numbers: 41.52 27.18 96.03 The median of 41.52, 27.18, and 96.03 is 41.52. Process returned 0 (0x0) execution time : 10.082 s Press any key to continue. 10 points possible if you have the above portion of the program working showing the correct median number given three real number input values. Once you have the three-number case working, extend the program to handle five numbers. An additional 5 extra credit points will be provided if you are able to show the correct median number given five real number input values. Note: You may develop and implement your algorithm incrementally (i.e., with three numbers input and then the remaining two numbers) or choose to write your algorithm based on five input numbers. Input Validation: No input validation is required for this program. Assumption is that the numbers input are real numbers and unique. Be sure to use proper program formatting and appropriate prompts to the user in your code. The output should be labeled clearly and formatted neatly. Save your completed algorithm (source code) by naming your file as follows: LastName_median.cpp. To submit use the file upload option to send your final version of this extra credit programming challenge. Make sure to also include your name and section number in the comment section of source code submitted. (HINT: Construct your algorithm using nested if/else statements with relational and/or logical expressions. I prefer that you not use arrays, vectors, lists or other sorting algorithms. ) OR A simple calculator Write an interactive program that performs as a very simple binary operations calculator. Your calculator should be able to handle the four basic math operations add, subtract, multiply, and divide on two input values. Your program should prompt the user to enter three arguments: two double values and a character to represent an operation. For example, if the entry arguments are 35.6, 24.1, and +, the program output should be The sum of 35.6 and 24.1 is 59.7. Provide specific prompts for user input that make it clear to the user how the values must be entered. Be sure to use proper program formatting and appropriate comments in your code. The output should be labeled clearly and formatted neatly. Save your completed algorithm (source code) by naming your file as follows: LastName_calculator.cpp. To submit use the file upload option to send your final version of this extra credit programming challenge. Make sure to also include your name and section number in the comment section of source code submitted. (HINT: Construct your algorithm using a switch statement)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!