#include <iostream>
#include <cstdio>
using namespace std;
void decimal_to_binary(int n){
if(n == 0) return;
decimal_to_binary(n/2);
cout<<n%2;
}
int main()
{
int n;
while(cin>>n){
decimal_to_binary(n);
puts("");
}
return 0;
}
Saturday, August 17, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment