Hi there ! I am Chinmay Garud . In this blog we would be doing some basic and easy programs using Embedded C . If you like it please do share it with your friends and family. I'd be grateful for any comments or suggestions you might have
35. WAP to check given number is power of 2 or not.
Get link
Facebook
X
Pinterest
Email
Other Apps
#include<stdio.h>
void
main()
{
int num;
printf("Enter a number : ");
scanf("%d",&num);
num&(num-1) ? printf("Not a
power\n") : printf("Is a power\n");
Comments
Post a Comment