A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
seperate numbers from float number
Joined: Sep 21, 2009
Nov 19, 2012 19:41:50
I have a number var num=1.234 i want to take the numbers before and after the dot i.e 1 and 2, save it in two variables like before=1,after=2, how can i achieve this. please help me.
thanks in advance.
Author and ninkuma
Joined: Jan 10, 2002
Nov 19, 2012 20:35:12
Did you look for help from the Math object?
Asking smart questions
Books by Bear
I agree. Here's the link:
subject: seperate numbers from float number
help with counting occurrences of elements in an array
Help with displaying output
java decimal multiplication
How to make sure that file has been read.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015