lesson 47
This commit is contained in:
parent
4bebb5b445
commit
c4761a5ee6
|
@ -16,8 +16,7 @@ int main()
|
|||
cin >> n;
|
||||
cout << "Число " << n << " в двоичной системе счисления: ";
|
||||
|
||||
for (int i = 7; i >= 0; --i)
|
||||
{
|
||||
for (int i = 7; i >= 0; --i) {
|
||||
int degree = pow(2, i);
|
||||
cout << (n >= degree) << (i == 4 ? " " : "");
|
||||
if (degree <= n)
|
||||
|
|
Loading…
Reference in New Issue