| 12 | |
| 13 | |
| 14 | int main() |
| 15 | { |
| 16 | int a[10000],n,count=0,max=0; |
| 17 | |
| 18 | scanf("%d",&n); //enter the integer |
| 19 | while(n){ |
| 20 | if(n%2!=0) //if n is divisible by 2 then count will increase by 1 |
| 21 | |
| 22 | count++; |
| 23 | else |
| 24 | count=0; //else count will remain 0 |
| 25 | if(max<count) //if count's value is greater than max's value |
| 26 | max=count; //then count's value is stored in max |
| 27 | n>>=1; |
| 28 | } |
| 29 | printf("%d",max); //value stored in max is printed. |
| 30 | return 0; |
| 31 | } |
nothing calls this directly
no outgoing calls
no test coverage detected