+ 2

Can you help me in this question

int x = 15; int y = 4; result = x/y; system.out.println(result) the result of the code

20th Apr 2018, 10:26 AM
Farhat Anjum Rizvi
Farhat Anjum Rizvi - avatar
10 Answers
+ 7
3 cause it's an int
20th Apr 2018, 1:57 PM
Rowien Ramsamoedj
Rowien Ramsamoedj - avatar
+ 6
The answer is 3. 😊
20th Apr 2018, 10:47 AM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
+ 5
15/4 is 3.75 but an int will just cut the decimals without rounding, so the result is 3
20th Apr 2018, 10:49 AM
DaEistee
+ 4
Well you're basically dividing x/y (15/4).
20th Apr 2018, 10:43 AM
Paul Yan
Paul Yan - avatar
+ 4
answer is 3.75. but system cut 0.75. answer is 3.
20th Apr 2018, 2:12 PM
Vizer_31
Vizer_31 - avatar
+ 2
The answer is 3 because result is int
21st Apr 2018, 12:35 AM
Juanito
+ 1
the answer is 3
29th Sep 2018, 4:21 AM
Tharun
Tharun - avatar
0
3 because the data type is int.
22nd Sep 2018, 12:17 PM
megha chandran
0
undefined
15th Oct 2018, 10:40 PM
Gev Sargsyan 🇦🇲
Gev Sargsyan 🇦🇲 - avatar