+ 1
i can't understand modulus (%)
4 Antworten
+ 3
Modulus is showing the remainder of division. it is used in many languages like C, C#......
+ 2
it is a symbol used in format specifier
ex: int - %d
float - %f
char - %c or %s
it is also used for modulo division.
which prints remainder when we divide two numbers
ex: 5÷2 = 2.5
5%2 = 1
0
oooow thank you very much!!!!!, so the remainder is the important thing!!!! i got it
0
Modulus is showing the remainder of division, in lot of languages modulus is used like php, c#, c and c++:
Ex: if we want to take modulus of 23 divided by 3 its 2
23%3 = 2
3 × 7 = 21
21 + 2 = 23
Now modulus of 23 is 2