24.7k views
4 votes
Brianna Watt, a consultant doing business as Watt Gives, wants a program to create an invoice for consulting services. Normally, she works on a project for five days before sending an invoice. She writes down the number of hours worked on each day and needs a program that asks for these amounts, totals them, and multiplies the amount by her standard rate of $30.00 per hour. The invoice should include Brianna’s business name, the client’s business name, the total number of hours worked, the rate, and the total amount billed. The information will be displayed onscreen. Using pseudocode, develope an algorithm to solve this program. Include standard documentation and comments.

1 Answer

1 vote

Answer:

The pseudocode is as follows:

Total_Hours = 0

Input Client_Name

Rate = 30.00

For days = 1 to 5

Input Hours_worked

Total_Hours = Total_Hours + Hours_Worked

Charges = Rate * Total_Hours

Print "Brianna Watt"

Print Client_Name

Print Total_Hours

Print Rate

Print Charges

Step-by-step explanation:

This initializes the total hours worked to 0

Total_Hours = 0

This gets input for the client name

Input Client_Name

This initializes the standard rate to 30.00

Rate = 30.00

This iterates through the 5 days of work

For days = 1 to 5

This gets input for the hours worked each day

Input Hours_worked

This calculates the total hours worked for the 5 days

Total_Hours = Total_Hours + Hours_Worked

This calculates the total charges

Charges = Rate * Total_Hours

This prints the company name

Print "Brianna Watt"

This prints the client name

Print Client_Name

This prints the total hours worked

Print Total_Hours

This prints the standard rate

Print Rate

This prints the total charges

Print Charges

User Matiss
by
5.1k points