+ 1
How can i convert to float or integer?
5 ответов
+ 6
x = 6.00;
y = int(x);
// y now references the value 6 not 6.0
+ 1
Just declare the typecast variable again as an int('•••••••. ')
I hope that would make U out.
0
typecast it..
0
float() converts integers to floats for example:
x=9.0
x=float(x)
print(x)
output:
9
- 2
Simple:
int x = Math.round(float)