- 2

fun main(args: Array<String>) { var total = 200 var items=7 println(total / items) println(total % items

What is the reason guys?

11th Sep 2022, 5:18 PM
Ephrem Hailu
Ephrem Hailu - avatar
3 Antworten
+ 6
In addition: Please put the programming language in the tag section and summarize what the code is supposed to do.
11th Sep 2022, 5:26 PM
Lisa
Lisa - avatar
+ 4
A title is a perfect place to hold your question. As you can see, your code got cut off You can give a link to the code playground, it would be much easier for others to review your code.
11th Sep 2022, 5:23 PM
Apollo-Roboto
Apollo-Roboto - avatar
+ 2
Ephrem Hailu It looks like you are asking about / and % The modulo is the remainder of a division as 17 can be divided by 5 = 3 but using the modulo is more like 17 - (15 = ( 5 * 3 )) with a remainder of 2
11th Sep 2022, 5:36 PM
BroFar
BroFar - avatar