السبت، 16 يونيو 2012

Prime numbers

A prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself. A natural number greater than 1 that is not a prime number is called a composite number. For example, 5 is prime, as only 1 and 5 divide it, whereas 6 is composite, since it has the divisors 2 and 3 in addition to 1 and 6.


Published with Blogger-droid v2.0.4

الجمعة، 15 يونيو 2012

Division meaning

The % operator is all about left overs. a%b means simply "how many are left over when we attempt to put a things into b (equal) piles?". So, eg, if you put 26 things into 6 piles you find that you have 2 things left over. 26%6=2.


Published with Blogger-droid v2.0.4

How to calculate the reminder..

A remainder is the amount left after a number is taken out of another number a set amount of times. This is best explained by an example:Remainder of 26 / 6:

26 - 6 = 20     

20 - 6 = 14

14 - 6 = 8                           

8 - 6 = 2         

Since 2 is less than 6, it is the remainder. Therefore, the REMAINDER of 26/6 = 2


Published with Blogger-droid v2.0.4