Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Introduction The purpose of this assignment is to reinforce concepts around procedures, nested loops, and data validation ( CLO 3 , 4 ) . Please

Introduction
The purpose of this assignment is to reinforce concepts around procedures, nested loops, and data
validation (CLO 3,4). Please be sure to thoroughly check the rubric - there are some specific requirements
with point penalties if they are not satisfied.
Designing and implementing procedures
Designing and implementing loops
Writing nested loops
Understanding data validation
What you must do
Program Description
Write a program to calculate prime numbers. First, the user is instructed to enter the number of primes to be displayed,
and is prompted to enter an integer in the range [1...200]. The user enters a number, n, and the program verifies that 1
n200. 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 every prime number up to and including the nth prime. The results must be displayed 10 prime
numbers per line, in ascending order, with at least 3 spaces between the numbers. The final row may contain fewer than
10 values.
Program Requirements
The programmer's name and program title must appear in the output.
The counting loop (1 to n) must be implemented using the Loop instruction.
The procedure must consist of only procedure calls (with any necessary framing). It should be a readable "list"
of what the program will do.
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:
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Knowledge Discovery In Databases

Authors: Animesh Adhikari, Jhimli Adhikari

1st Edition

3319132121, 9783319132129

More Books

Students also viewed these Databases questions

Question

=+Where does the focus of labor relations lie? Is it collective

Answered: 1 week ago