Abundant numbers are positive integers (greater than 0), that are less than the sum of their proper
Question:
Abundant numbers are positive integers (greater than 0), that are less than the sum of their proper divisors. A proper divisor is a positive integer into which that number can be divided with no remainder. A proper divisor must also be less than the number itself. For example, 6 is a proper divisor of 12, but 12 is not a proper divisor of 12. The proper divisors of 12 are 1,2, 3, 4 and 6. Their sum is 16 - (1+2+3+4+6), which is greater than 12. Therefore, 12 is an example of an abundant number. As this example shows, one way to find out all the proper divisors of a number is to try out each integer (starting at 1) until you reach the number divided by 2. Write a program that reads in a list of numbers from an input text file called input.txt. For each number read, your program should determine and print out whether or not that number is abundant. The format for the input file is specified in the section: “Input Specification.”
Input Specification:
1.The first line of the file contains a single integer n that is less than 100. This number (n) indicates the number of test cases in the file.
2. The next n lines will each contain a single positive integer (less than 100). Your program must test each of these numbers to determine whether it is abundant or not.
Output Specification:
Output a line with one of the two the following formats for each test case:
Test case #t: X is abundant.
Test case #t: X is NOT abundant.
Where t represents the number of the test case (starting with 1), and X represents the number for that case.
"Using Dev-C coding" not C++
Discrete Mathematics and Its Applications
ISBN: 978-0073383095
7th edition
Authors: Kenneth H. Rosen