Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a C program to check if a number is power of 2 #416

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nasafix-nasser
Copy link

This is writen as a one line-function of course.

Please describe your program and how to run it.

$ gcc c/nasafix-nasser_isPowerOf2.c -o app
$ ./app
Enter a number > 1: 12
No

$ ./app
Enter a number > 1: 256
Yes


What Programming Language?

C

This is writen as a one line-function of course.
@wzhouwzhou wzhouwzhou added hacktoberfest-accepted Hacktoberfest! Lang: C Contributions made in C labels Oct 27, 2019
wzhouwzhou
wzhouwzhou previously approved these changes Oct 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Hacktoberfest! Lang: C Contributions made in C
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants