void print_in_binary(int x) //Если не соответствует, переводит в 2-ю систему
{
while (x != 1) {
if (x % 2 == 0) {
std::cout << "0";
}
else {std::cout << "1"; }
x = x / 2;
}
std::cout << "1" << std::endl;
}
dm9pZCBwcmludF9pbl9iaW5hcnkoaW50IHgpIC8v0JXRgdC70Lgg0L3QtSDRgdC+0L7RgtCy0LXRgtGB0YLQstGD0LXRgiwg0L/QtdGA0LXQstC+0LTQuNGCINCyIDIt0Y4g0YHQuNGB0YLQtdC80YMKewoJCgl3aGlsZSAoeCAhPSAxKSB7CgkJaWYgKHggJSAyID09IDApIHsKCQkJc3RkOjpjb3V0IDw8ICIwIjsKCQl9CgkJCgkJZWxzZSB7c3RkOjpjb3V0IDw8ICIxIjsgfQoJCXggPSB4IC8gMjsKCX0KCXN0ZDo6Y291dCA8PCAiMSIgPDwgc3RkOjplbmRsOwoKfQ==
Main.java:1: error: class, interface, or enum expected
void print_in_binary(int x) //???? ?? ?????????????, ????????? ? 2-? ???????
^
Main.java:1: error: class, interface, or enum expected
void print_in_binary(int x) //???? ?? ?????????????, ????????? ? 2-? ???????
^
Main.java:7: error: class, interface, or enum expected
}
^
Main.java:9: error: class, interface, or enum expected
else {std::cout << "1"; }
^
Main.java:11: error: class, interface, or enum expected
}
^
Main.java:14: error: class, interface, or enum expected
}
^
6 errors