is 2 square is 2**2
and wht does a%=b does it a have difference from a%b ( by the way it means modulo, doesnt it???)
and a+=b...
what does this mean a?b
Printable View
is 2 square is 2**2
and wht does a%=b does it a have difference from a%b ( by the way it means modulo, doesnt it???)
and a+=b...
what does this mean a?b
%= Do modulo and assign.
+= Do addition and assign.
2 square is pow(2, 2) [function]
a ? b You probably saw something like a ? b : c, which means if a is true, return b, otherwise c. It's an if shortcut.
there is no operator as **.instead a power function is present in c.Quote:
is 2 square is 2**2
eg
Quote:
pow(m,n)//calculates m raised to the power n
this means a=a%b where % is the modulo operator which gives the remainder of a/b;Quote:
and wht does a%=b does it a have difference from a%b
similarly a+=b means a=a+b;
a?b doesn't do anything.it must be a?b:c where ?: is a ternary operator which means if a is true retun b else return c.