Program to check whether a number is Abundant number or not | FACE Prep
Published on 10 Mar 2020
Program to check whether a number is Abundant number or not is discussed here. An abundant number is a number for which the sum of its proper divisors is greater than the number itself.
Input & Output format:
- Input consists of 1 integer.
- If it is an Abundant number display Abundant Number or display Not Abundant Number.
The divisors of 12 are 1, 2, 3, 4 and 6.
The sum of divisors of 12 is 16.
12 < 16.Hence, 12 is an abundant number.
Algorithm to check whether a number is an abundant number or not
- Input a number from the user.
- Find the sum of its divisors.
- If sum < num, print "Abundant Number".
- Else, print "Not Abundant Number".
Program to check whether a number is an abundant number or not
If you have any feedback about this
article and want to improve this, please write to email@example.com