cout & lt ;& lt ; endl & lt ;& lt ; ― Its perimeter is :\ t ‖ & lt ;& lt ; peri ; 29 . 30 . /* -------read the length and the width of a rectangle and compute and print its area and perimeter ------------------------------------- */ 31 . cout & lt ;& lt ; endl & lt ;& lt ; ― enter the length and the width of the rectangle :\ t ‖; 32 . cin & gt ;& gt ; len & gt ;& gt ; width ; 33 . 34 . computeAreaPeri1 ( ); 35 . cout & lt ;& lt ; endl & lt ;& lt ; ― the area of the rectangle is :\ t ‖ & lt ;& lt ; area ; 36 . cout & lt ;& lt ; endl & lt ;& lt ; ― Its perimeter is :\ t ‖ & lt ;& lt ; peri ; 37 . return ( 0 ); } © 2011 Gilbert Ndjatou Page 170 Global Variables and Local Variables A global variable is a variable that is defined outside of the body of any function . Examples of global variables are variables len , width , area , and peri defined in figure F1 , line 6 to line 9 . A global variable can be accessed in the body of any function that appears after its definition . Example In the source module in figure F1 , len is accessed in the body of function computeAreaPeri1 in lines 15 and