Project: Renard Numbers (Preferred Numbers)
Write a program that computes the Renard (Preferred) Numbers between 1 and 1000. The user should be allowed to specify the series R5, R10, R20 or R40 on the command line by passing a single argument of 5, 10, 20 or 40. This argument specifies how many divisions should be made in the interval 1 to 10. These preferred numbers are computed as a geometric series using a factor of the 5th, 10th, 20th or 40th root of 10. Preferred numbers in the range 10-100, and 100-1000 are computed by multiplying the values in the range 1-10 by factors of 10 and 100 respectively. By computing the values in the range 1-10 and storing them in an array makes it easy to compute the values in the other ranges.
The perfect numbers are typically rounded to a small number of decimal places. You can use formatted output to round the values on output to the desired number of decimal places. The user should be allowed to specify on the command line a second argument that dictates the number of decimal places to round on output.
See [[Renard Numbers]]