Question: Objectives 1. Designing and implementing procedures 2. Designing and implementing loops 3. Writing nested loops 4. Understanding data validation Problem Definition Write a program to


Objectives 1. Designing and implementing procedures 2. Designing and implementing loops 3. Writing nested loops 4. Understanding data validation Problem Definition Write a program to calculate composite numbers. First, the user is instructed to enter the number of composites to be displayed, and is prompted to enter an integer in the range (1.300). The user enters a number, n, and the program verifies that 1 ss 300. If n is out of range, the user is re-prompted until they enter a value in the specified range. The program then calculates and displays all of the composite numbers up to and including the nth composite. The results should be displayed 10 composites per line with at least 3 spaces between the numbers. Requirements 1. The programmer's name must appear in the output. 2. The counting loop (1 to n) must be implemented using the MASM loop instruction. 3. The main procedure must consist (mostly) of procedure calls. It should be a readable "list" of what the program will do. 4. Each procedure will implement a section of the program logic, i.e., each procedure will specify how the logic of its section is implemented. The program must be modularized into at least the following procedures and sub- procedures: o introduction o getUserData validate showComposites isComposite o goodbye 5. The upper limit should be defined and used as a constant. 6. Data validation is required. If the user enters a number outside the range (1.300) an error message should be displayed and the user should be prompted to re-enter the number of composites. 7. Each procedure must have a procedure header that follows the format discussed during lecture. 8. The usual requirements regarding documentation, readability, user-friendliness, etc., apply
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
