simple calculations How? intHrlyRate, etc Help me

Reply

Join Date: Sep 2004
Posts: 7
Reputation: jchamel is an unknown quantity at this point 
Solved Threads: 0
jchamel's Avatar
jchamel jchamel is offline Offline
Newbie Poster

simple calculations How? intHrlyRate, etc Help me

 
0
  #1
Oct 5th, 2004
I can not figure out what to do. I need one html file to read an asp file for these 4 variables (1) intHrlyRate, (2) intWeeklyRate, (3) intMonthlyRate, and (4) intAnnunalRate. I am suppose to use arithmetic functions to calculate the
intWeeklyRate (based on 40 hrs per week and assign value of 10 to intHrlyRate), the intMontlyRate, and the intAnnualRate variables. Using response.write all variables to the screen
My result should be Hourly Rate = 10
Weekly Rate = 400
Monthly Rate = 1733
Annual Rate = 20800
all I can figure out so far is this( which I bet is wrong) NOT Good with Math

I think this is what i am suppose to show for my asp file. I not quite sure how to even start the html file Or do I have this backwards.
<html>
<head>
</head>
<title>arithmetic calculations</title>
<body>
<%
Dim intHrlyRate, intWeeklyRate, intMonthlyRate, intAnnualRate
intHrlyRate = 10
intWeeklyRate = 40
intMonthlyRate = intHrlyRate * intWeeklyRAte
intAnnunalRAte = intHrlyRate * intWeeklyRate * intMonthlyRate
Response.write intHrlyRate
Response.write intWeeklyRate
Response.write intMonthlyRate
Response.write intAnnunalRate


</html>
</body>
Please for the love of God someone take pitty on a poor helpless girl trying to learn asp.
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 166
Reputation: Lafinboy is an unknown quantity at this point 
Solved Threads: 7
Lafinboy's Avatar
Lafinboy Lafinboy is offline Offline
Junior Poster

Re: simple calculations How? intHrlyRate, etc Help me

 
0
  #2
Oct 5th, 2004
This is a very simplistic solution to your problem.

  1. <%
  2. Dim intHrlyRate, intWeeklyRate, intMonthlyRate, intAnnualRate
  3. intHrlyRate = 10 '// $ rate per hour
  4. intWeeklyRate = intHrlyRate * 40 '// hourly rate multiplied by hours per week
  5. intMonthlyRate = 4.33 * intWeeklyRate '// 52 weeks divided by 12 months multiplied by the weekly rate
  6. intAnnunalRAte = 52 * intWeeklyRate '// 52 weeks multiplied by the weekly rate
  7. Response.write "Hourly Rate = $" & intHrlyRate & "<br>"
  8. Response.write "Weekly Rate = $" & intWeeklyRate & "<br>"
  9. Response.write "Monthly Rate = $" & intMonthlyRate & "<br>"
  10. Response.write "Annual Rate = $" & intAnnunalRate & "<br>"
  11. %>
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.

Lafinboy Productions
:: Website Design :: Website Development ::

Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7
Reputation: jchamel is an unknown quantity at this point 
Solved Threads: 0
jchamel's Avatar
jchamel jchamel is offline Offline
Newbie Poster

Re: simple calculations How? intHrlyRate, etc Help me

 
0
  #3
Oct 13th, 2004
Originally Posted by Lafinboy
This is a very simplistic solution to your problem.

  1. <%
  2. Dim intHrlyRate, intWeeklyRate, intMonthlyRate, intAnnualRate
  3. intHrlyRate = 10 '// $ rate per hour
  4. intWeeklyRate = intHrlyRate * 40 '// hourly rate multiplied by hours per week
  5. intMonthlyRate = 4.33 * intWeeklyRate '// 52 weeks divided by 12 months multiplied by the weekly rate
  6. intAnnunalRAte = 52 * intWeeklyRate '// 52 weeks multiplied by the weekly rate
  7. Response.write "Hourly Rate = $" & intHrlyRate & "<br>"
  8. Response.write "Weekly Rate = $" & intWeeklyRate & "<br>"
  9. Response.write "Monthly Rate = $" & intMonthlyRate & "<br>"
  10. Response.write "Annual Rate = $" & intAnnunalRate & "<br>"
  11. %>
I found out that my assignment really needed this for the monthrate to come out to 1733. I was told this was needed to do that
intMonthlyRate = CInt(intAnnualRate / 12) '// Annual Rate divided by 12 months the cInt means to divide the annual rate by 12. I missed that other than that he said this was fine.
Thought I would add this for FYI
Thanks
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC