0% found this document useful (0 votes)
619 views2 pages

CS 2401 Programming Assignment Unit 6 Final

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 2

Q1) Draw the flowchart of the above algorithm

Q2) . Draw the corresponding graph and label the nodes as n1, n2, … and edges as e1,
e2,…

Q3) Calculate the cyclomatic complexity of the above algorithm


By using the formula, Cyclomatic complexity => E – N + 2*P
Edges (E) = 22
Nodes (N) = 19
Exit Point (P) = 1
 22 – 19 + (2 * 1)
3+2
 5 (no. of closed regions)
VLI (G) = no. of closed regions + 1
Hence, VLI (G) = 5 + 1 = 6

You might also like