INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Java Anyone?  (Read 1771 times)

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Java Anyone?
« on: August 20, 2005, 10:33:07 am »

I was hoping to find someone that knew a tad of java to make a calculator to find out how many cds basied on megs and gigs a user would input then figure a price for each disk.

500 megs=1 disks X $5 = $5
701 megs=2 disks X $5 = $10

if your intrested in helping let me know i have a webpage i have to explain what i am trying to do.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re: Java Anyone?
« Reply #1 on: August 20, 2005, 02:25:20 pm »

ok i got part of it but i always want to round up

Disks.value = Math.round(Disks.value)

the above only rounds up when above .4

any ideas?
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Pookus

  • Recent member
  • *
  • Posts: 19
Re: Java Anyone?
« Reply #2 on: September 05, 2005, 03:07:00 am »

ok i got part of it but i always want to round up

Disks.value = Math.round(Disks.value)

the above only rounds up when above .4

any ideas?

I'm not sure if I'm getting this right, but aren't you just looking for a simple integer division? If the remainder != 0 you add 1 to the result of the division. The remainder operator is %.

Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re: Java Anyone?
« Reply #3 on: September 05, 2005, 05:34:43 am »

Sorry I Figured It Out, But I Could Not Figure Out How To Use It With PayPal's Shoping Cart.

Basicly I Wanted A Way To Allow A User To Look And See How Much It Would Take To Copy Files To CD's And Then Charge The Amount It Would Take To Fit On The # Of CD's, Then Charge A User For It In PayPals Shopping Cart.

It Was An Idea I Was Playing With.

So If They Wanted Boston Blackie, And There Was Lets Say 1300 Megs It Would Take Two CD's, And Cost $14 For 2 CD's About 198, 30 Min Shows

Then Take That Info And Put It In PayPals Shopping Cart

But I Could Not Figure Out The Last Part.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

pank2002

  • Citizen of the Universe
  • *****
  • Posts: 623
Re: Java Anyone?
« Reply #4 on: September 05, 2005, 01:27:30 pm »

Maybe you can use these calcs as a basis and modify one of them:
http://www.bookmarklets.com/tools/convert/index.phtml

Is this for allofmusic.com?
Logged
Music is life... the rest is details.
Here is a security related website: secubi.dk

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re: Java Anyone?
« Reply #5 on: September 05, 2005, 02:34:54 pm »

Maybe you can use these calcs as a basis and modify one of them:
http://www.bookmarklets.com/tools/convert/index.phtml

Is this for allofmusic.com?

HEHE, thats how i figured it out

no, for another project
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA
Pages: [1]   Go Up