$ ./guess_the_language
Problem Solving — predict the output
Problem Solving — predict the output · medium · #249
What is the output?
fmt.Println(-7/2, -7%2)
-4 1
-3 1
-4 -1
-3 -1
Go integer division truncates toward zero (-3), and the remainder takes the sign of the dividend (-1). Python would give -4 1.
Play Problem Solving ▸
◂ #248
all Problem Solving — predict the output questions
#250 ▸