0% found this document useful (0 votes)
148 views

Assignment 2

This program defines variables to store the length, width, area, and perimeter of a figure. It reads the user-input length and width, calculates the area by multiplying length by width, calculates the perimeter by adding twice the length and twice the width, and writes the length, width, area, and perimeter values to the output.

Uploaded by

anon-919837
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
148 views

Assignment 2

This program defines variables to store the length, width, area, and perimeter of a figure. It reads the user-input length and width, calculates the area by multiplying length by width, calculates the perimeter by adding twice the length and twice the width, and writes the length, width, area, and perimeter values to the output.

Uploaded by

anon-919837
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Daniel McCoy

CISP-300
Assignment 2

Name Type Range Description


length number 0-100 The length of the figure.
width number 0-100 The width of the figure.
area number 0-10000 The area of the figure.
perimeter number 0-400 The perimeter of the figure.

START

READ
length, width

area =
length * width

perimeter =
(2 * length) + (2 * width)

WRITE
‘Length: ‘ length

WRITE
‘Width: ‘ width

WRITE
‘Area: ‘ area

WRITE
‘Perimeter: ‘ perimeter

STOP

You might also like