
tiny % questjun
could any1 verify that this is correct plz (its in c++ )
4 % 3 = 3
4 % 5 = 1
6 % 8 = 2
thanks

4 mod 3 = 1
4 mod 5 = 4
6 mod 8 = 8
mod is modular division - remember grade school math well mod is just the remainder so
4 mod 3 is 1 remainder 1 so the answer is 1
4 mod 5 is 0 remainder 4 so the answer is 4
.
.
.
hope that helped
Smile, it won''t let you live longer, but it is funny when they die with a smile.
4 mod 5 = 4
6 mod 8 = 8
mod is modular division - remember grade school math well mod is just the remainder so
4 mod 3 is 1 remainder 1 so the answer is 1
4 mod 5 is 0 remainder 4 so the answer is 4
.
.
.
hope that helped
Smile, it won''t let you live longer, but it is funny when they die with a smile.
Smile, it won't let you live longer, but it is funny when they die with a smile.
And yes, you are correct, if you swap your operands...
3 % 4 = 3
5 % 4 = 1
8 % 6 = 2
G''luck,
-Alamar
3 % 4 = 3
5 % 4 = 1
8 % 6 = 2
G''luck,
-Alamar
ok thanks
btw:
if you have a &ref to array[0], and you want &ref to point at array[1] .. would this be the correct way to change it:
&( ref += 1 )
or... ?
im not getting any errors when i do it like that, but i get some weird results..
btw:
if you have a &ref to array[0], and you want &ref to point at array[1] .. would this be the correct way to change it:
&( ref += 1 )
or... ?
im not getting any errors when i do it like that, but i get some weird results..
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement