I think either the flag variable should be initialized to “true” in order to get “YES” as output or the correct output should have been “NO”. Please look at it.
I think either the flag variable should be initialized to “true” in order to get “YES” as output or the correct output should have been “NO”. Please look at it.