convert double into int
29,315
double myDouble = 8.943
int myInt = (int) (myDouble * 1000000)
Using (int) casts the double into an int
Author by
Mohsin AR
Creator of youtube Channel Code Seekhlo Currently Software Engineer at Signboxsoftwares, Karachi Pakistan. Passionate to learn more and more about Flutter, & Spring boot Love to Donate my free service of software development to all beginners contact me: [email protected] The more you are giver the more graceful you will be.
Updated on June 20, 2020Comments
-
Mohsin AR almost 4 years
I have following
double
value:8.943
need to convert(cast) intoint
e.g:8.943*1000000 = 8943000
required value -->8943000
please help!
thanks.