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 C++plz 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 76,105,115 and 97, which add up to 393. For the uppercased name, "LISA", the values are 76,73,83 and 65, for a total of 297. The lowercased name,
4
COSC 2425 F24
"lisa", has ASCII values of 108,105,115 and 97, totaling 425. These three sums are added together 393+297+425 to equal 1115, which is then divided by three to equal 371.66667, which is then divided by the length of the name, four, to make 92.916667.
Input from the keyboard a list of names each on separate lines, terminating input with -1. 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 10 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 (Y/N): N
In C + + plz Write a program to calculate a "name

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 Programming Questions!