Consider the following program segment: 1. int find-maximum (int i, int j, int k) 2. { 3.
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 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?
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Flexible, Reliable Software Using Patterns And Agile Development
ISBN: 9781439882726
1st Edition
Authors: Henrik B Christensen
Question Posted: