# What is cyclo metric number?

#### yesjey Profile Answers by yesjey

• Nov 30th, 2007

Cyclomatic complexity is probably the most widely used complexity metric in software engineering.

How to calculate cyclomatic complexity?

CC = Number of decisions + 1

Thus, cyclomatic complexity equals the number of decisions plus one. What are decisions? Decisions are caused by conditional statements. In Visual Basic they are If..Then..Else, Select Case, For..Next, Do..Loop, While..Wend/End While, Catch and When. The cyclomatic complexity of a procedure with no decisions equals 1. There is no maximum value since a procedure can have any number of decisions.

#### G.D.S.Prasad Profile Answers by G.D.S.Prasad Questions by G.D.S.Prasad

• Mar 3rd, 2009

Cyclo metric complexity (Number) is software metric that provides
quantitative measure of the logical complexity of a program.

Cyclomatic complexity has a foundation in graph theory and provides us with
extremely useful software metric. Complexity is computed in one of the three
ways:

1. The number of regions of the flow graph corresponds to the Cyclomatic
complexity.
2. Cyclomatic complexity, V(G), for a flow graph, G is defined as
V (G) = E-N+2Where E, is the number of flow graph edges, N is the number of flow
graph nodes.
3. Cyclomatic complexity, V (G) for a flow graph, G is also defined as:
V (G) = P+1Where P is the number of predicate nodes contained in the flow graph
G.  