+ 2
I'd appreciate some help rounding down a Double the nearest Int please help
fun main(args: Array<String>) { var area:Double var side = 10.5 area = side * side print(area) } I'd like this to print out 110 and not 110.25
6 Answers
+ 2
Try
print(Math.floor(area))
You can also do a search online to find our about it.
+ 1
use math.floor( )
+ 1
idk where to put the Math.floor()
+ 1
What programing language are you using?
+ 1
Im using kotlin
+ 1
Hmm. sorry. Try
println(Math.round(area))