+ 2
% indicates what??
14 Answers
+ 7
% is the modulus operator, giving you the remainder of the euclidian division.
42%9 is 6 because 42 = 9*4 + 6
a%b is 0 if a is a multiple of b
a%2 is 0 if a is even and 1 if a is odd
a%10 gives you the last digit of a
a%100 gives you the last two digits of a
etc.
+ 2
% mean : value remaining in division
for example : 50 % 6
50 /6 >> 8 x 6 = 48 >> 50 -48 = 2
so the result is = 2
+ 2
% means remainder if there is 7%2 here remainder we get is 1 so the answer will be 1
+ 1
int x=10;
int y=(x%4)*3-2;
cout<<y++;
how the answer is 4
+ 1
it is modulous
if u use it
it gives remainder not quotient..
+ 1
we can described it as
12=2*5+2 ,2 is a reminder
+ 1
% remainder operator that is
7%2=1 displays only the remainder
7/2=3 displays only the quotent
+ 1
It is like this.
quotient=divisor//dividend (Floor division)
remainder=quotient+divisor-dividend
Modulus returns the remainder
+ 1
it gives remainder of the division as output
+ 1
% indicates reminder operator(modulus) ...it is used to get the reminder after dividing two numbers. for example: 6%4=2!
+ 1
% module is the term of remainder after the
Complete divination 😀😀 .
Let's fun with % module
😂😂
0
modulus or remainder
0
it is a modulus operator. it requires two operands to work. it is used to produce remainder.
E.x. 4%2=0
10%4=2
.Hope this helps.
- 1
'%' also is also known as 'modulus operator' which is used to get the reminder in division operations. For example:
4%1=0
4%2=0
4%3=1
4%5=4