Nowy kurs! Każdy programista powinien nauczyć się Generative AI!
Wypróbuj darmową lekcję0
By using type conversion add 2 float numbers but the result must be integer
4 odpowiedzi
+ 5
It would be great if you can tell us the language you want to know. To finally get an integer needs also some more information from you. What version you like to use:
4.49 -> 4 or 5
4.51 -> 4 or 5
+ 1
Use round()
+ 1
You are likely going to get one
Int
This 2.56 : 2 or 3
Else
10 .61 : 11 or 10
0
Tag language also in which you are looking..
In python,
int() cast to Integer result.
Ex:
s=int(4.0+5.0) =>s=9