Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
binary
#include <iostream> using namespace std; void binary(int d) { int rem; if (d <= 1) { cout << d; return; } rem = d % 2; binary(d / 2); cout<<rem; } int main() { int a; do { cout<<"Enter a positive number : "<<endl; cin>>a; } while (a<0); cout<<"Binary is : "; binary(a); cout<<endl; system("pause"); }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
decrypt_problem_5
Baaad1
Click 5
Bad palindrom
Przesylka
virtual function role
Vector+Memory_Adv_C++_Tutorial
fastest input taking for large files
aaaaaaaaaaaa
CyclicExpression Checker
Please log in to post a comment.