Internet Developer - JavaScript Assignment #2

Problem #1: Last assignment I asked you to take in three book prices and calculate the average. I want you to redo this program so you use a loop and inside the loop you prompt for the price of a book. I want you to go through the loop 5 times so that you get a price for 5 books. Inside the loop you should also add to a total that will give you the total for the 5 books. When the loop is complete, figure out the average and display it on the screen.

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

Problem #3: This time I want you to have a loop that will take in the price of the book and I want the book to end when the user enters a N to say they have no more books to answer. For each of these when the loop is done be sure you print out the average.

Problem #4: I want you to write the JavaScript code that includes onmouseover and on mouse out.

Problem #5: I want you to write the JavaScript code that includes the onclick and two other events of your choice.