Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
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
Two-phase sample with GCC
Pairs having sum equal to target
Metodos
Good1
Hello World
Roger Cheng
sample
Nobita's candies problem
append
shell sort