We have a string as a C program; please calculate its cyclomatic complexity.
The cyclomatic complexity is the number of keywords, including if, case, while, for, and ? in a program.
Note that variables and functions can have names like "for1234" and "while456", but they do not count as the cyclomatic complexity.
Also, there will be no string constants having these keywords, and there are no comments to process.
The input is a C program.
The output is the cyclomatic complexity of the C program.
The purpose of the samples is to calculate the cyclomatic complexity.
Both of the samples contain variables or functions with the name similar to the keywords.
Note that there could be spaces between the keywords and "(".