how to use % operator? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

how to use % operator?

I wonder how to use it.. really confused me

24th Feb 2017, 12:00 PM
Fast Hit
Fast Hit - avatar
4 Answers
+ 9
Wrong @uvaish zafri. % is modulus operator and it gives remainder not quotient. eg: 5%2=1
24th Feb 2017, 12:36 PM
Mr.Robot
Mr.Robot - avatar
+ 6
It gives you the remainder of the interger division, you use it as the rest of the operations but with %, for example: 7 % 4= 3
24th Feb 2017, 1:15 PM
C.E.
C.E. - avatar
+ 1
remainder are stored in this like as 10%3=1 16%3=1
26th Feb 2017, 6:15 AM
Xerox
Xerox - avatar
0
What does it means by % this symbol
20th Jul 2020, 11:41 AM
Varun Shirodkar