+ 3

How to calculate modulus ?

calculate modulus

29th Jan 2018, 2:54 PM
Hossam Hassan
Hossam Hassan - avatar
2 Respostas
+ 17
Modulus is the operator which returns the remainder of division operation... For eg.:- cout<<9%2; // outputs:- 1 as 9/2=4 ---> 9=4*2+"1" cout<<25%7 // outputs :- 4 NOTE:- using modulus operator on floating point nos. will cause error... In C++ :- 5th slide https://www.sololearn.com/learn/CPlusPlus/1609/?ref=app
29th Jan 2018, 3:05 PM
🌛DT🌜
🌛DT🌜 - avatar
+ 2
yea i remember it now... i was know it but forgot but now i rememberd thank you :)
29th Jan 2018, 3:26 PM
Hossam Hassan
Hossam Hassan - avatar