For this Question: Anamika chooses a number N and they feel happy if the total number of set bits in N is equal to 1.
Decide whether Anamika is happy or sad.first line contains a single number N.Print "Happy" if Anamika is happy otherwise print "Sad".Sample Input 1:
4

Sample Output 1:
Happy


Sample Input 2:
7

Sample output 2:
Sad, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;

int main()
{
 int n;
 cin>>n;
 cout<<((n&(n-1))==0? "Happy" : "Sad");
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?