10%3 how to solve it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

10%3 how to solve it?

Please help me solving it.

11th Jul 2020, 9:23 AM
Tahsin Ahmed
Tahsin Ahmed - avatar
5 Answers
+ 5
Tahsin Ahmed First of all you must know what this operator do. % is an binary operator which means that it can be applied only if there are two values that is it can't be used with a single value. Moreover this operator is called 'modulo' operator in python and returns the remainder we get after the division of those two numbers we used with this operator Now suppose we have given 10%3 It just return the value we get as remainder after dividing 10 by 3. So 10%3 will return the value 1. I hope you understand. If there is still any querry then mention me with that querry. Thank you.
11th Jul 2020, 9:31 AM
Akshay Panwar
Akshay Panwar - avatar
+ 6
% is a modulus operator in javascript thos will give you the remainder after dividing 10 by 3 so here when we divide 10 by 3 , 1 is left behind as a remainder so this will result in 1.
11th Jul 2020, 9:28 AM
Ayush Kumar
Ayush Kumar - avatar
11th Jul 2020, 9:38 AM
Akshay Panwar
Akshay Panwar - avatar
+ 3
๐Ÿ˜Š๐Ÿ˜Š๐Ÿ˜ŠThanks to all.๐Ÿ˜Š๐Ÿ˜Š๐Ÿ˜Š
11th Jul 2020, 12:10 PM
Tahsin Ahmed
Tahsin Ahmed - avatar
+ 1
Tahsin Ahmed '%' this operatot is called remainder and when 10 divisible by 3 it gave the remainder 1
13th Jul 2020, 6:57 AM
Navneet Kaur๐Ÿ’ซ
Navneet Kaur๐Ÿ’ซ - avatar