crashoverride
05-30-2005, 10:29 PM
have to write script for class project.
here's what it is that i have to do:
1.)Frist, prompt the user for four values that represent the numbers of pennies, nickels, dimes and quaters in the jar. For each one, use a prompt statement (with default value zero) to get the input value as a character string, and use the parseFlorat function (actually, the similar parseInt function is just as good here) to convert it to an integer value and store it in a variable.
2.)Next, create four variables that store the values 0.01, 0.05, 1.10, and 0.25 (the monetary value of a penny, a nickel, a dime, and a quater).
3.)Using the four input values and the four variables storing the monetary value of each type of coin, compute and store in a variable the total value of the collection of coins.
4.)Using document.write statements, construct a table with two rows and five columns. The five cells in the top row will show the names of the four types of coins and the text "Total value". The five cells in the bottom row will show the number of each of the four types of coin and the total value of the coins.
5.)Go back and set the background color of the document, the background color of the table, and the color of the text in the table to any values you choose (other than the default values!) that are still easily readable. Use an embedded style sheet.
The professor obviously isn't clear as to what exactly he wants. He wants this all done with out a WYSIWYG editor for a beginner class. I just need a C for this class and I will be happy. So someone anyone PLEASE HELP!!!!! :eek:
here's what it is that i have to do:
1.)Frist, prompt the user for four values that represent the numbers of pennies, nickels, dimes and quaters in the jar. For each one, use a prompt statement (with default value zero) to get the input value as a character string, and use the parseFlorat function (actually, the similar parseInt function is just as good here) to convert it to an integer value and store it in a variable.
2.)Next, create four variables that store the values 0.01, 0.05, 1.10, and 0.25 (the monetary value of a penny, a nickel, a dime, and a quater).
3.)Using the four input values and the four variables storing the monetary value of each type of coin, compute and store in a variable the total value of the collection of coins.
4.)Using document.write statements, construct a table with two rows and five columns. The five cells in the top row will show the names of the four types of coins and the text "Total value". The five cells in the bottom row will show the number of each of the four types of coin and the total value of the coins.
5.)Go back and set the background color of the document, the background color of the table, and the color of the text in the table to any values you choose (other than the default values!) that are still easily readable. Use an embedded style sheet.
The professor obviously isn't clear as to what exactly he wants. He wants this all done with out a WYSIWYG editor for a beginner class. I just need a C for this class and I will be happy. So someone anyone PLEASE HELP!!!!! :eek: