Run Code
|
API
|
Code Wall
|
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
Sum of digits of number
co_assign_1_ques_1
Lazy String Tokenizer Class
an awesome question of basic graph traversal (786A)
memcpy
template
reverse function
sd2
Microsoft - MaxEmployeeAttendence (R repititions - 1st step towards DP.)
Mapas - convertir número telefónico