Professional Documents
Culture Documents
1. Write an algorithm and construct a flowchart that will compute and display the
area and perimeter of the shapes listed below.
a. Rectangle - given as user inputs the length and width.
b. Square - given as user input the side.
c. Circle - given as user input the radius. The perimeter of a circle is just its
circumference.
(Hint: Make sure to use the correct formulas.)
Repetition/Looping(While statement):
5. Write an algorithm and construct a flowchart that accepts a positive integer n and
use a while loop structure to compute for the product of sums from 1 to n using a
while loop structure and after computation, output the productOfSums.
Hint: if input n=5 then prodOfSums = (1+1) x (2+2) x (3+3) x (4+4) x (5+5) = 3840
6. Write an algorithm and construct a flowchart that computes the area and
circumference of a circle five (5) times using a while loop structure. For each time,
get radius R as a user input, compute the Area and Circumference, and output the
values of R, Area and Circumference.
Hint: Area = pi * R * R, Circumference = 2 * pi * R, where pi = 3.1416.