This assignment has a series of problems I want you to solve by writing the
JavaScript code.
Problem #1: Take in the points you earned in game one, the points you earned in game two and the points you earned in game 3.
Tell the average points you earned over the three games.
- Problem #2: Take in the name of an item, the price of the item and the cost of the item.
On the document write the name of the item and the profit that you can get from the
item. Remember profit is price - cost.
- Problem #3: Take in the pay per hour, the hours worked, and the withhold amount.
Multiply the pay per hour by the hours worked to get the gross pay. Subtract the withhold
amount to get the net pay. Display both the gross pay and the net pay.
- Problem #4: Take in the product idno and the sales for the week for item for the last 4 weeks. Determine the average for the four
weeks. If the average is greater than 1000 classify the product as type A. If the average is greater than 500 classify the product as
type B if the average is greater than 100 classify the product as type C otherwise classify it as type D.
- Problem #5: Modify problem #4 so you have a loop that takes in and processes 3 different products.
- Problem #6: Modify problem #5 so you end the loop when the user enters a code meaning no more products.
- Problem #7: Write a loop that prompts the user for the amount they just spent and displays
the amount and the total spent so far. When the total becomes larger than 500, stop the loop.