Question: Write a C++ program for the following question. Each student will have a set of (a, b, c, d, and mode) parameters. Calculate your set

Write a C++ program for the following question.

Each student will have a set of (a, b, c, d, and mode) parameters. Calculate your set of parameters using the following information. The alphabet is numbered - a=1, b=2, c=3, ... m=13 n=13, o=12, p=11, ... z=1

Using the first 5 letters of your surname (repeat the last letter if less than 5) the parameters are calculated as follows : Parameter Example (James Herd) a = first letter * 100S a = h * 100S = 8 * 100S = 800S b = second letter * 100S b = e * 100S = 5 * 100S = 500S c = third letter + 4 c = r + 4 = 9 + 4 = 13 d = fourth letter * 500S d = d * 500S = 4 * 500S = 2.0mS mode = remainder (fifth letter/4) +1 mode = rem(d / 4) +1 = rem(4 / 4) +1 =1 Therefore James Herd would be given the parameter set 800S, 500S, 13, 2.0mS and mode 1. The rem function is the integer division REMAINDER function, i.e. the remainder when the numerator is divided by the denominator. E.g. rem (10/3) = 1.

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!