function area (l, w : int) : int
result l * w
end area
put "The area of a rectangle that has a length of "
put "20 and a width of 40 is ", area(20, 40)
var a : int
a := area(50, 30)
put "The are of 50 x 30 rectangle is ", a
if area(20, 20) = area (40, 10) then
put "The areas are the same"
else
put "The areas are not the same"
end if
|