Examlex

Solved

Consider the Following Pseudocode. What Does It Produce

question 36

Multiple Choice

Consider the following pseudocode. What does it produce?
Create a list of consecutive integers from two to n: (2, 3, 4, ..., n) .
Initially, let p equal 2.
Repeat following steps until p2 is greater than n
Strike from the list all multiples of p less than or equal to n.
Find the first number remaining on the list greater than p.
Replace p with this number.


Definitions:

Certificate of Deposit

A savings certificate with a fixed maturity date and fixed interest rate, issued by banks to individuals desiring to save money for a fixed period.

Compounded Annually

The process of calculating interest and adding it to the principal sum of a deposit or loan once per year.

Interest Rate

The rate at which interest is paid by borrowers for the use of money that they borrow from lenders.

Pension Fund

A type of investment pool typically set up by an employer to generate stable growth over the long term and provide pensions for employees when they reach the end of their working years.

Related Questions