Question: Programming Assignment 2 Due Thursday February 7th Please solve the following problems completely. You must provide a hard copy of the programs and their outputs.

Programming Assignment 2 Due Thursday February 7th Please solve the following problems completely. You must provide a hard copy of the programs and their outputs.

1. 40 points Write a C++ program that computes a students grade for an assignment as a percentage given the students score and the total points. The final score should be rounded up to the nearest whole value using the ceil function in the header file. You should also display the floating-point result up to 5 decimal places. The input to the program must come from a file containing a single line with the score and total separated by a space. In addition, you should print to the console Excellent if the grade is greater than 90, Well Done if the grade is greater than 80, Good if the grade is greater than 70, Need improvement if the grade greater than or equal to 60, and Fail if the grade is less than 50.

2. 30 points ROT13 (rotate by 13 places) is a simple letter substitution cipher that is an instance of Caesar cipher developed in ancient Rome and used by Julius Caesar who used it in his private correspondence. ROT13 replaces a letter with the letter 13 letters after it in the alphabet. The following table demonstrates the translation in ROT13:

A < > N

B < > O

C < > P

D < > Q

E < > R

F < > S

G < > T

H < > U

I < > V

J < > W

K < > X

L < > Y

M < > Z

Thus, the translation of the word JULIUS using ROT13 would be WHYVHF. Write a C++ program that inputs a letter and outputs the corresponding letter using the ROT13 encoding scheme above. Your output should look like G > T.

3. 30 points Use functional decomposition 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, if the user enters 41.52 27.18 96.03 Then the program would output The median of 41.52, 27.18, and 96.03 is 41.52.

Once you have the three-number case working, extend the program to handle five numbers. Be sure to use proper formatting and appropriate comments in your code. The output should be labeled clearly and formatted neatly.

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!