Битовые операции




Task
Дано число x. Проверить, является ли число степенью двойки.
 
Ввод Вывод
2 1
3 0

Prohibited operators:if
C++
Write a program below
#include<iostream>
using namespace std;

int check(int x) {
	
	return  
}
int main()
{
	int x;
	cin >> x;
	cout << check(x);
	return 0;

}
  
Your last submission is saved in the editor window.
     

Results:

All results: