Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void degree(double n) {
- if (n == 1) {
- cout << "YES" << endl;
- }
- else if (n < 2) {
- cout << "NO" << endl;
- }
- else {
- return degree(n / 2);
- }
- }
- int main() {
- setlocale(LC_ALL, "ru");
- degree(32);
- degree(35);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement