Application:
Program Selection Structure
Repetition Structures
Functions
C. Requirement Description:
Write a program that displays the following patterns separately. Continuously prompt
the user of what pattern should the program display until the user entered a sentinel
value. Use any repetition structures to generate the patterns. All asterisks (*) should
be printed by a single statement (this causes the asterisks to print side by side).
There should be no other output statements in the program. [Hint: The last two patterns
require that each line begin with an appropriate number of blanks.] Maximize your use
of repetition and minimize the number of output statements. Implement this program to
also use functions. Each pattern should be displayed by a function.
2007-09-05
03:40:36
·
2 answers
·
asked by
carlo
1
in
Computers & Internet
➔ Programming & Design