+ 1

True or False

correct me if I'm wrong but if res give us the remainder figure then 8/5 is 3 because 5 can only go into 8 once and the remaining number from 5 To 8 is 3 hence the remaining (res) is 3. correct me if I'm wrong

28th May 2017, 6:48 AM
Dante
6 Antworten
+ 2
combine them, maybe like this x = 8/5; y = 8%5; convert x and y to string then print x + "r" + y
28th May 2017, 7:03 AM
Setiawan Next
Setiawan Next - avatar
+ 1
if you mean only the remainder its true. can be said like this 8/5 is 1 /integer division 8%5 is 3 / remainder
28th May 2017, 6:52 AM
Setiawan Next
Setiawan Next - avatar
+ 1
Okay in java script terms I get that. on paper it's 1r3 that's 1 remainder 3 under the calculation of java script the modolus calculation is 3 but for just the integer which cancels the remainder number that would be 1 under the / method.
28th May 2017, 6:56 AM
Dante
+ 1
what if I wanted the full answer as 1.3 or 1r3 how would I go about achieving that or can it only be done in stages with the comprehension of ones mathematical knowledge. p.s. thanks for your vast reply.
28th May 2017, 6:58 AM
Dante
+ 1
thanks I shall try that. Thank you for your help. off java I knew the answer it's just I'm new to java and it in-depth knowledge just wanted to make sure I was doing the right thing. thanks for your help.confirmations & suggestions. java buddy from now on jazakallah.
28th May 2017, 7:06 AM
Dante
+ 1
you are welcome
28th May 2017, 7:11 AM
Setiawan Next
Setiawan Next - avatar