Software Testing Question
Program P3 CFG.
a) Identify the basic blocks for the following program P3 written in pseudo-code.
b) Draw the control flow graph.
Program P3
1) integer A, B; 2) input (A);
3) if (A > 7)
4) {
5) B = 1;
6) } // end if A>7
7) else
8) {
9) B = 2;
10) if (A < 2)
11) B = 3;
12) } // end else A≤7
13) while (int i=1; i<=A; i++)
14) {
15) if (A<4)
16) B = B + 4;
17) else
18) B = B - 5;
19) } // end for loop
20) output (A,B);
21) end;
Software Testing Question Program P3 CFG. a) Identify the basic blocks for the following program P3...