Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your local charity has tasked you with writing a computer program that calculates the average of the donations made by 3 donors. The program should

Your local charity has tasked you with writing a computer program that calculates the average of the donations made by 3 donors. The program should ask for the name of each donor, ask for the amount donated by each donor, and calculate the average. The output of the program should display the donor name, the amount donated for each donor. The program should finally output a message that shows the average donated amount. Example output:

Tyra 50

Nathaniel 30

Lillian 10

Average of these donations is: 30

First, describe your algorithm using pseudocode.

Translate the pseudocode into a C++ program. You must comment your program including comments at the top of the file that explains what the program does and comments for every line of code that explains what is happening for the line of code. Apply troubleshooting and testing strategies to ensure your code compiles, runs, and provides accurate results.

Step by Step Solution

3.47 Rating (160 Votes )

There are 3 Steps involved in it

Step: 1

include include using namespac... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Discrete Mathematics and Its Applications

Authors: Kenneth H. Rosen

7th edition

0073383090, 978-0073383095

More Books

Students also viewed these Programming questions

Question

Outline Watson and Rayners classic work on fear conditioning.

Answered: 1 week ago