Why <?php $num=14; $num1=3; echo $num%$num1 ?> Is 2 ? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Why <?php $num=14; $num1=3; echo $num%$num1 ?> Is 2 ?

helpme please

1st Jun 2017, 1:58 PM
Antony Antolentino Casimiro
Antony Antolentino Casimiro - avatar
3 Réponses
+ 2
because 2 is the rest when you divide integers 14/3 result is 4 3*4=12 and 2 is the missing value to get 14 12%3=0 13%3=1 14%3=2 15%3=0 (15/3=5) 16%3=1 ...
1st Jun 2017, 2:18 PM
Michal
Michal - avatar
0
thanks :D
3rd Jun 2017, 4:46 PM
Antony Antolentino Casimiro
Antony Antolentino Casimiro - avatar
0
Thanks (Y).
4th Jul 2017, 11:47 PM
Sandra Curo
Sandra Curo - avatar