IN ORDER TO IMPLEMENT A SET OF RULES / TUTORIALOUTLET DOT COM IN ORDER TOIMPLEMENTASETOFRULES/TUTORIALOUTLET.COM | Page 12
// to hold the perimeter
10.
11.
/*------------------------function computeAreaPeri1 ---------------------*/
12.
/*------- compute the area and the perimeter of a rectangle -----------*/
13.
void computeAreaPeri1( void )
14.
{
15.
area = len * width;
16.
peri = 2 * ( len + width );
17.
}
18.
19.
int main ()
20.
{
21.
/*-------compute and print the area and the perimeter of a rectangle
with
length 20 and width 8 ---------------------------------------------*/
22.
23.
len = 20;
24.
width = 8;
25.
26.
computeAreaPeri1( );
27.
cout << endl << ―the area of the rectangle is:\t‖
<< area;
28.