C-Programs

-Prime Number -> Prime numbers are natural numbers which is only divisible by self and 1 -> ex -> 7 number is divide by itself and 1 it must be a natural number -> x will only divide when the number is in the range between 2 to x-1

-Length of String calculated without using strlen()

-HCF -Highest Common Factor

  1. HCF is a number which divides both the numbers ex:- num1 = 4 & num2 = 6
  2. HCF is a big number , there is no bigger number than this (hcf) then it is HCF.

-Amicable Numbers (Friendly Numbers)

  1. if they have common abundancy index , Or the ratio between sum of divisors of a number and the number itself.
  2. Divisors of 6 are 1,2,3,6
  3. Divisors of 28 are 1,2,4,7,14,28
  4. Sum of divisors of 6 and 28 are 12 and 56 respectively.
  5. Also abundant index of 6 and 28 is 2. Therefore, 6 and 28 is a friendly pair