Is there any rule that quotient must be integer only ? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Is there any rule that quotient must be integer only ?

when 1.25%0.5 the result is 0.25. since both of them are float, can't its quotient become float? one more thing when i tried 1.25/0.5 i got NO OUTPUT why?

5th Nov 2016, 3:49 AM
Dinesh Devaki
Dinesh Devaki - avatar
1 Resposta
+ 2
/ 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:01 AM
Dinesh Devaki
Dinesh Devaki - avatar