Category: Types Of Numbers
- Write a program to check if a number is prime or not.A number is prime if it has only two factors i.e. 1 and itself. ex:- 2,3,5,7,11,......etc.
- Write a program to check if a number is composite or not.A number is composite if it has more than two factors. ex:- 4,6,8,9,10......etc.
- A number which is the sum of its aliquot parts(proper divisors) is known as a perfect number. For example, a number 6 has 1,2,3 as aliquot parts. Adding these we get 6 again. 6,28,496,8128 are perfect
- Write a program to find the HCF of two numbers, say a and b. The LCM can be computed by the formula: LCM = (axb)/HCF.
- A number such that both the sum of its divisors and the number of its divisors are perfect numbers. The smallest sublime number is 12. There are 6 divisors of 12 - 1, 2, 3, 4, 6, and 12 - the sum of w
- A number that is smaller than the sum of its aliquot parts (proper divisors). Twelve is the smallest abundant number - the sum of its aliquot parts is 1 + 2 + 3 + 4 + 6 = 16 - followed by 18, 20, 24,
- A weird number is an abundant number that is not semiperfect; in other words, n is weird if the sum of its divisors is greater than n, but n is not equal to the sum of any subset of its divisors. The
- A deficient number is one that is greater than the sum of its aliquot parts. The first few deficient numbers are 1, 2, 3, 4, 5, 7, 8, and 9. Any divisor of a deficient (or perfect) number is deficient