convert float to int code example
Example 1: convert float to int python
# convert float to int
x=3.1415
y=int(x)
print(y) #outputs 3
Example 2: convertir un float en int en java
int bob = (int) 3.14; \\ bob = 3
# convert float to int
x=3.1415
y=int(x)
print(y) #outputs 3
int bob = (int) 3.14; \\ bob = 3