Consider the following pseudo-code
I = 0; J = 0; K = 8;
while (I < K-1) / / while-1
{
J=J+1;
while ( J< K) / /while-2
{
If (x[I] < x[J] )
{
temp = x[I];
x[I] = x[J];
x[J] = temp;
}
} // end of while-2
I=I+1
} // end of while-1
The cyclomatic complexity of the above is1
3
2
2
3
4
4
1