
Preliminaries
IDOVH
WHILEÐDONE
OUTPUT PRODUCT
3TART
%ND
WUXH
BOOL DONE
PRODUCT
INT NUMPRODUCTPOWER
INPUTDONE
INPUTNUM
PRODUCTPRODUCTNUM
INPUTDONE
)LJ Flow graph of Program P1.3. Numbers 1 through 4 indicate the four basic
blocks in Program P1.3.
4, &OE) is the path traversed when EPOF is USVF the first time the
loop condition is checked. If there is only one value of OVN to be
processed, then the path followed is (4UBSU,1,2,3,2,4,&OE). When
there are two input integers to be multiplied then the path traversed
is (4UBSU,1,2,3,2,3,2,4,&OE).
Notice that the length of the path traversed increases with the
number of times the loop ...