/*Doi so nguyen duong N sang dang nhi phan-Cau truc du lieu*/#include #include #include using namespace std; void Binconvertint N { if N!=0 { BinconvertN/2; cout.
Trang 1/*Doi so nguyen duong N sang dang nhi phan-Cau truc du lieu*/
#include<conio.h>
#include<stdio.h>
#include<iostream>
using namespace std;
void Binconvert(int N)
{
if (N!=0)
{
Binconvert(N/2);
cout<<N%2;
}
}
void main()
{
int N;
cout<<"Doi so nguyen duong N sang dang nhi phan-Cau truc du lieu: "<<endl; cout<<" -o0o -"<<endl;
cout<<"Moi nhap N: ";
cin>>N;
Binconvert(N);
getch();
}