I'm working on a homework assignment and I have absolutely no idea where to begin with the creation of this function. Here is my assignment, briefly:
I am to create a shirts.html file that creates a form with a number of pieces textbox input, with three buttons: employee total, show summary and clear form. A link to the entire homework assignment, if needed: http://www.skydreamer.co.uk/school/web-scripting/shirts.html
The first thing to do is create a function to calculate the following:
Number of shirts ; Price Per Piece
1 to 199 ; .50
200 to 399; .55
400 to 599 ; .60
600 or more ; .65
Do I use less than, greater than operators to figure this?? If so, I am not quite sure how to go about it - they seem to only calculate two things then. I was doing quite well on my programming homework, which is surprising but now I am 110% stuck. Any help would be greatly appreciated.
Or maybe this should use the if...then...elseif statements? Thanks again for your time...
Question
Nickel
I'm working on a homework assignment and I have absolutely no idea where to begin with the creation of this function. Here is my assignment, briefly:
I am to create a shirts.html file that creates a form with a number of pieces textbox input, with three buttons: employee total, show summary and clear form. A link to the entire homework assignment, if needed: http://www.skydreamer.co.uk/school/web-scripting/shirts.html
The first thing to do is create a function to calculate the following:
Number of shirts ; Price Per Piece
1 to 199 ; .50
200 to 399; .55
400 to 599 ; .60
600 or more ; .65
Do I use less than, greater than operators to figure this?? If so, I am not quite sure how to go about it - they seem to only calculate two things then. I was doing quite well on my programming homework, which is surprising but now I am 110% stuck. Any help would be greatly appreciated.
Or maybe this should use the if...then...elseif statements? Thanks again for your time...
Link to comment
Share on other sites
3 answers to this question
Recommended Posts