Module: Hoạt động bit (C++)


Problem

8/13

Kiểm tra xem một số có phải là lũy thừa của hai không

Problem

Cho một số x. Kiểm tra xem một số có phải là lũy thừa của hai không.

Thêm đoạn mã còn thiếu vào chương trình.
 

 

Ví dụ
<đầu>

# Đầu vào Đầu ra
1 2 1
2 3 0
Write the program below
#include<iostream>
using namespace std;

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

}
    

     

Program check result

To check the solution of the problem, you need to register or log in!