- 2

why can't the answer be 6.0 ?

12th Sep 2016, 3:09 AM
Henal Shah
Henal Shah - avatar
3 Respuestas
+ 1
Because it returns ant Int (integer). That means numbers like : 1 or 10 or 0 or 66. Numers with no decimals. If you wanna return a decimal number, you would use a float or a double
28th Oct 2016, 4:43 PM
Levi Geers
Levi Geers - avatar
0
What do you mean?
12th Sep 2016, 4:24 AM
Kyle
0
since the data type specified is double so the answer can be 6.0
12th Sep 2016, 5:53 AM
Henal Shah
Henal Shah - avatar