The program must accept an integer N as the input. The program must print YES if the least significant bit of N is set as 1. Else the program must print NO as the output.
Example Input/Output 1:
Input:
11
Output:
YES
solution:
int main()
{
int a;
scanf("%d",&a);
if(a&1==1){
printf("Yes");}
else{
printf("no");
}
}
No comments:
Post a Comment