Internet Developer - JavaScript Assignment #2

Problem #1: Take in 4 numbers and calculate the average. If the average is > 1000 then display "Good", if the average is between 500 and 1000 display "OK" else display "Poor". You can do this with a loop or without a loop. If you do it with a loop extra credit.

Problem #2: Write a program that will do a loop 3 times. In the loop you want prompts where you can enter the item name, the price and the cost. Also within the loop you want to calculate the profit. And still within the loop you want to have an if statement that tests the profit. If the profit is over 10 you want to put out the message saying "Good profit" otherwise you want to say "Poor profit".

Problem #3: I want you to write a program with a loop. You should have a loop that takes in name, hours worked and pay per hour and calculates and display the pay for each person - you should have the loop execute 4 times so you process 4 employees. As you process, I want you to also add to a total pay accumulator and after the loop ends I want you to display the total.

Problem #4: Redo the program above but instead of doing it 5 times, due it until the total pay is greater than 5000.

Problem #5: This time I want you to end the loop when the user enters an N. You can either have the user type a N as the name or you can set up a control variable that tests for the end.