I need help writing a code that checks if a variable is 2^n where n>0.... and i can't use hard code like if (n == 2 || n == 4 || n==8).... Please help
simply check if (n%2==0) it will do what you want. Thanks...................
Content will be erased after question is completed.
Enter the email address associated with your account, and we will email you a link to reset your password.
Forgot your password?