Question: In C + + plz Write a program to calculate a name weight on a list of people's first names. The formula takes three sums,
In Cplz Write a program to calculate a "name weight" on a list of people's first names. The formula takes three sums, averages those three sums, and then divides the average by the number of letters in each person's name. The first sum is found by adding up the ASCII values for each person's name, just as it is with the first letter in uppercase, and the rest in lower case. The second sum adds up all the ASCII values of the uppercased version of the name, and the third sum adds up the values for the lowercased version. For example, the values for characters in the name "Lisa" are and which add up to For the uppercased name, "LISA", the values are and for a total of The lowercased name,
COSC F
"lisa", has ASCII values of and totaling These three sums are added together to equal which is then divided by three to equal which is then divided by the length of the name, four, to make
Input from the keyboard a list of names each on separate lines, terminating input with Output to the screen all the names in descending order by "name weight" average, as described above and shown in the example below. Assume there will be no names longer than letters. For each name in the list, output to the screen original form of the name, the three sums in order: original, uppercased, lowercased all right justified, and the final "name weight" average, formatted to two decimal places. Finally, the program should ask if the user wants to run the program again Check case Refer to the sample output below.
Sample Run:Run again YN: N
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
