Question: a) For the following control flow graph, calculate the cyclomatic complexity. Show your work. b) For the following program P2, calculate the cyclomatic complexity. Show
a) For the following control flow graph, calculate the cyclomatic complexity. Show your work.
b) For the following program P2, calculate the cyclomatic complexity. Show your work.
Program P2
1) integer A, B;
2) input (A);
3)
4) if (A > 7)
5) { 6) B =1; 7) } 8) else 9) { 10) B = 2; 11) if (A 7
14) 15) while (i=1; i
16) { 17) if (B
25) } // end loop 26) 27) output (A,B); 28) end;
Start true false true 3 false 5 false true true alse EndStep by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
