what is difference between // and %, please explain with suitable example | Sololearn: Learn to code for FREE!
Nowy kurs! Każdy programista powinien nauczyć się Generative AI!
Wypróbuj darmową lekcję
+ 3

what is difference between // and %, please explain with suitable example

18th Jul 2016, 3:42 PM
RAVI ABHISHEK
RAVI ABHISHEK - avatar
1 Odpowiedź
0
/ gives you quotient in flot with remainder 0 // gives you quotient in only in integer % gives you remainder. 4/2 : 2 4//2 : 2 4%2 : 0 5/2 : 2.5 5//2 : 2 5%2 : 1
5th Nov 2016, 4:00 AM
Dinesh Devaki
Dinesh Devaki - avatar