Sie sind auf Seite 1von 1

Flowcharts Practice Exercises

1. Draw a flowchart that will obtain length and width for a rectangle from a user. Calculate area
and perimeter of the rectangle and display it. If the length and width of the rectangle are equal,
output a message indicating that the figure is a square.

2. Draw the flowchart that accepts a number of ages as input from the keyboard until zero is
entered. If the age is greater than or equal to 100 output "You have lived a century", otherwise
if age is greater than or equal to 50 output "You are already half way to the century otherwise
output "You are still young."

3. Draw a flowchart for a program that will obtain 10 exam scores from the user and determine
whether the score is passing (a score of 60 or above) or failing. Your algorithm should count the
number of passing and failing scores. Output the average of the all the scores, the number of
failing scores, and the number of passing scores.

4. Write an algorithm and draw a flowchart to add the following sequence

a. 1, 3 , 5, 7, 9 . . . N (series of odd numbers)

b. 2, 4 , 6, 8, 10 . . . N (series of even numbers)

Das könnte Ihnen auch gefallen