Answer the question
In order to leave comments, you need to log in
How to get the integer part of a real number?
There is a real number.
For example : double x = 23.35;
How to get its integer part ?
Answer the question
In order to leave comments, you need to log in
or int integralPart = (int) x;
long integralPart = (long) x;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question