Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Problem: binary
#include<iostream> using namespace std; int main() { int num,binary[35]; int i; cout << "Enter a number" << endl ; cin >> num; while(num > 0) { binary[i]=num%2; i++; num = num/2; } cout<<"Binary form is " << endl; for(int j=i-1; j>=0; j--) { cout<<binary[j]; } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
expm1
RegexMatch
Lowest common ancestor in binary tree
YesToDafT
.
cppPyAbs
rstring
code_chef
11933
ProdPriceEnum
Please log in to post a comment.