950 likes | 1.13k Vues
IS ‘N’ A PRIME NUMBER ?. DONE BY: ISHTIAQUE KHAN 1757, CSEDU. THEORY ONE. WHAT IS A PRIME NUMBER ? A Prime Number is any integral number that has exactly 2 divisors. THEORY TWO. IS 0 A PRIME NUMBER? No, 0 is not a Prime Number. IS 1 A PRIME NUMBER? No, 1 is not a Prime Number.
E N D
IS ‘N’ A PRIME NUMBER ? DONE BY: ISHTIAQUE KHAN 1757, CSEDU
THEORY ONE • WHAT IS A PRIME NUMBER ? A Prime Number is any integral number that has exactly 2 divisors.
THEORY TWO • IS 0 A PRIME NUMBER? No, 0 is not a Prime Number. • IS 1 A PRIME NUMBER? No, 1 is not a Prime Number. • IS 2 A PRIME NUMBER? Yes, 2 is a Prime Number.
THEORY THREE • IF A POSITIVE INTEGER N IS NOT DIVISIBLE BY ANY NUMBER, X, IN THE RANGE: 2 <= X <= , THEN N IS NOT DIVISIBLE BY ANY NUMBER, X, IN THE RANGE: < X < N
LET N BE 37 LET X BE 2
THEREFORE N IS NOT DIVISIBLE BY 2 OR ANY OTHER MULTIPLE OF 2
LET N BE 37 LET X BE 3
THEREFORE N IS NOT DIVISIBLE BY 3 OR ANY OTHER MULTIPLE OF 3
LET N BE 37 LET X BE 4 BUT 4 IS ALREADY CHECKED
LET N BE 37 LET X BE 5
THEREFORE N IS NOT DIVISIBLE BY 5 OR ANY OTHER MULTIPLE OF 5