- 1

Error on this question?

shouldn't the x value in this question be 12?

6th Nov 2016, 1:15 AM
Adi Venkatesh
Adi Venkatesh - avatar
5 Antworten
+ 1
Where is the code?
6th Nov 2016, 5:41 PM
James Flanders
0
int x=15;int y=4 ; int result= x/y; System.out.println(result); question is what is the result answer is 3?
7th Nov 2016, 2:28 AM
Adi Venkatesh
Adi Venkatesh - avatar
0
Answer is 3
7th Nov 2016, 11:27 AM
Luis A. Black Silva
0
Luis A. Black Silva well it shouldn't be because 15 divided by 4 isn't 3
8th Nov 2016, 3:37 AM
Adi Venkatesh
Adi Venkatesh - avatar
0
but in an integer division, it does. 15/4=3.75, but as long as it's an integer division, every thing after the dot (including the dot) gets neglected. So 15/4=3
2nd May 2017, 5:08 PM
Luis A. Black Silva