I want to know the cyclomatic complexity of two section of code,
IF((A>B) AND (C>D))
{ a=a+b;c=c+d;}
as far my knowledge the cycloma
I think they have the same cyclomatic complexity of 3; this can be shown using De Morgan's Law.
IF((A>B) OR (C>D)) {a=a+b;c=c+d;} ELSE {}
IF(!((A>B) OR (C>D))) {} ELSE {a=a+b;c=c+d;}
IF(!(A>B) AND !(C>D)) {} ELSE {a=a+b;c=c+d;}
Another way of looking at it is to take the graph and swap the conditional block and the exit point (and reverse the edge between them) and this transforms it from an AND to an OR without changing the number of nodes or edges.