Question: CSIT 575-Programming Fundamentals for Computer Science Lab #4A Objectives To learn to code, compile and run a program containing REPETITION structures Assignment Plan and code

CSIT 575-Programming Fundamentals for Computer Science Lab #4A Objectives To learn to code, compile and run a program containing REPETITION structures Assignment Plan and code a program utilizing one or more repetition structures to solve the following problem evelop a program to analyze one or more numbers entered one at a time by a user. The user may enter one or more numbers for analysis. Determine if a number is a prime number or not, a perfect number or not. Output a list of all divisors of numbers that are not prime and a list of divisors of all perfect numbers. Format your output so there are between 5 and 10 numbers per line to conserve paper. DO NOT output one number per line. A prime number is one whose only exact divisors are 1 and the number itself (such as 2, 3, 5, 7, etc.) perfect number is one whose exact divisors (except the number) sum to equal the number. For example, 6 has 3 divisors (not including 6). The divisors of 6 (1, 2, 3) sum to equal the number. Thus, 6 is a perfect number Input should be limited to numbers from 1 through 1000. Check your solution with at least 6 numbers: at least 2 prime numbers; at least 2 perfect numbers; at least two numbers that are neither prime nor perfect. Check your solution with at least two sets of invalid data Use good program design, efficient code, and document your code with explanatory comments throughout BE SURE TO INCLUDE ADEQUATE ERROR HANDLING IN YOUR PROGRAM AND ERROR DATA WHEN YOU RUN THE PROGRAM TO DEMONSTRATE ERROR HANDLING Input One or more numbers entered by user. Output The input number whether the number is prime or not, and whether the number is perfect or not. A list of divisors of non-prime numbers and a list of divisors of perfect numbers. List more than one value per line to conserve paper. Extra Credit Output a list of all prime numbers and perfect numbers between 1 and 1000. List more than one value per line to conserve paper. Note Adequately check entered data for validity. Use adequate test data to process all valid data and representative data to show how your program handles invalid data Label all output clearly. Be sure your output file contains user prompts and what was entered by the user in addition to the results of your program processing
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
