I am not sure but somewhere back in my memory I do remember...that I read it
-> In program fragments .... cyclomatic complexity= (no. of conditional statements +1)
So for this program .....2 "if condition" =2
and 1 "while condition" which have AND conjuction means again comparisons = 1
Therefore 3+1 = 4 is the cyclomatic complexity
But I am not sure whether Else condition will taken in account or not , if it'll be taken in then CC will be 5
@Arjun sir ...kindly check this and correct me