Skip to content

Instantly share code, notes, and snippets.

@m1irka
Created October 24, 2024 15:41
Show Gist options
  • Select an option

  • Save m1irka/948b011a56be1e7a9f2beab126b3e191 to your computer and use it in GitHub Desktop.

Select an option

Save m1irka/948b011a56be1e7a9f2beab126b3e191 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main()
{
/*Запитати у користувача ціле число. Перетворити його із дес'ятичної системи у двоїчну*/
int number;
cout << "Enter number: ";
cin >> number;
while (number != 0)
{
cout << number % 2;
number /= 2;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment