Question: Consider the following program segment: 1. int find-maximum (int i, int j, int k) 2. { 3. int max; 4. if(i>j) then 5. if (i
Consider the following program segment:
1. int find-maximum (int i, int j, int k)
2. {
3. int max;
4. if(i>j) then 5. if (i 6. else max=k; 7. else if (j>k) max=j 8. else max=k 9. return (max); 10. } (a) Draw the control flow graph for this program segment. (b) Determine the cyclomatic complexity for this program (show the intermediate steps of your computation). (c) How is the cyclomatic complexity metric useful?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
