Jump to content

[SOLVED] Converting integer to decimal


Recommended Posts

I need to convert an integer to decimal..if no one can get it that's fine, i'm sure I can find another way, but any help would be nice...

basically this is what I need.

 

[psuedo]

user inputs a number

 

convert_to_decimal(number)

number is converted to a decimal

return number

[/psuedo]

 

now how would I go about doing this?

 

Thank you for any help guys!

Link to comment
Share on other sites

And before you say that there's a math based programming board, that's for real math problems that need to be solved with code, not simple division.

haha QFT

 

I've never seen someone use QFT on a programming board.  That just made my day. xD

Link to comment
Share on other sites

Haha, thanks for all the help guys! I did try the '.' . $number; but it didn't work for me for some reason haha, but once again thanks for everyone that helped! It's greatly appreciated.

 

Edit: Finally got the '.' . $number; working haha! Can't believe the first thing I tried actually works, been stressing over this for about an hour haha! But thanks ONCE againe.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.