Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

) Assume that the following pseudocode is executed in a program: Module main Declare x = 0 Declare sum = 0 Declare max = 4

)

Assume that the following pseudocode is executed in a program:

Module main Declare x = 0 Declare sum = 0 Declare max = 4 While (x < max) Display "x is ", x Set x = x + 1 Set sum = sum + x End While End Module

2) After the execution of this program, the final value of x is _______, and the final value of sum is ______

Write the program segment that includes a loop that will loop 5 times. With each iteration, ask the user for a number, and accumulate the sum. After the loop, print the sum of the numbers

3)

Looping Problem with If/Then/Else

A country club dues report is to be prepared. Pseudocode only using modules and the auto EOF DOWHILE loop.

Inputs consist of records containing the Country Club members name, the type of membership, and the years the member has belonged. The value F in the individual membership type field indicates a family membership. The value I indicates an individual membership. The input data is illustrated below.

NAME

MEMBERSHIP TYPE

YEARS

Harvey Hanley

F

9

Wilma Litt

F

7

Eugene Mitter

F

2

Wall Pitt

I

6

Eunice Ponnir

I

8

Output is a list of the country club members containing the members name, the membership type (FAMILY or INDIVIDUAL), the years the member has belonged, and the country club dues. The dues are calculated as follows: If the member is a family member and has been a member more than six years, the dues are $1,200.00. If the member is a family member and has been a member six years or less, the dues are $1,600.00. If the member is an individual member and has been a member longer than 6 years, the country club dues are $800.00. If the member is an individual member and has been a member 6 years or less, the dues are $1,100.00. After all records have been printed, totals for the number of members, the number of family members, the number of individual members, and the total dues are to be printed.

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

Databases Organizing Information Digital And Information Literacy

Authors: Greg Roza

1st Edition

1448805929, 978-1448805921

More Books

Students also viewed these Databases questions

Question

help asp

Answered: 1 week ago

Question

3. Evaluate a Web-based training site.

Answered: 1 week ago