
PLEASE HELP ME, MATH PROBLEM W/ ASP!
Alright, Im Making A Game, And In It Prices Of Metals Fluctuate Daily,<BR>The 'Base' Price And Volume Is 1000lbs And $50.00 If The Volume Doubles The Price Is Cut In Half, If It The Volume Is Cut In Half The Price Doubles, <BR>Example:<BR>VOL:2000lbs, PRI: $25.00<BR>VOL:1000lbs, PRI: $50.00<BR>VOL:500lbs, PRI: $100.00<BR><BR>What I Do Know Is, Is 'Yesterdays Price', AND 'Total Volume', And I Need A Formula That Will Give Me 'Todays Price', Is There A Math Formula, Or ASP Function That Will Do That?

Oh, come on!
YOU do the math (show your work!) and if you can't convert it to VBScript (*NOT* ASP...ASP isn't a language) then show us what you have so far and we can help.<BR><BR>But we don't do homework, as a general rule.<BR><BR>

And you need more than that!
I ... Know ... 'Yesterdays Price', AND 'Total Volume'<BR><BR>How does that help? You need Yesterday's Volume *and* Today's Volume.<BR><BR>As well as Yesterday's Price.<BR><BR>

RE: Oh, come on!
I Can Convert It To VBScript Easy, But Im Not Good At Math...Please Help...<BR>

RE: And you need more than that!
alright, i can get yesterdays volume and todays volume

RE: question?
Wouldn't you just take the total number of transactions yesterday and divide them by the total?<BR><BR><BR><%<BR>Dim str<BR>str = Array("50","25","25","100","100")<BR><BR>Dim i<BR>For i = 0 To UBound(str)<BR> prc = int( Prc + str(i) )<BR>Next<BR><BR>Response.Write( prc / int(UBound(str)+1) )<BR>' Result 60<BR>%>

RE: question?
because i dont have the total number of transactions just the total, see every user has a certain amount of metal say jon has 100lbs and bob has 1000lbs i just get the amount of all the metals...what there doin in the game is searchin for the metals, proccessing them, then selling them according to todays price...

Sorry, a little humorous
"An ASP Function"<BR><BR>I'm sure the architects of VBS many years ago said "Hey, we need Split() and Replace() and Instr() And a function that will take "Yesterdays Price" of a metal and compare it to the "total volume" to see what "todays price" should be"<BR><BR>heheheheheh.

RE: Sorry, a little humorous
Well They Are Dumb, They Should Have, And It Would Have Made My Live Much Easier! :)

RE: Ummm
I suggest keeping track of the transactions.<BR>Otherwise impossible.<BR><BR>50  1000<BR>25  2000<BR>25  2000<BR>100  500<BR>100  500<BR><BR>300  6000 <BR><BR>6000 / 300 = 20<BR><BR>300 / 5 = 60 ' This is correct.<BR><BR><BR>good luck
Posting Permissions
 You may not post new threads
 You may not post replies
 You may not post attachments
 You may not edit your posts

Forum Rules

