#include <stdio.h> int main() { int n,c=0; printf("enter a number:\n"); scanf("%d",&n); if(n%2==1) { do { n=n/2; c++; } while (n!=1); } printf("%d",c); return 0; }
To embed this project on your website, copy the following code and paste it into your website's HTML: