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
Dar
DeepaC++
mine
Microsoft - MaxEmployeeAttendence (R repititions - 1st step towards DP solution)
collection Hetero
Hello world.c
vertical sum
Finding Ocean
count pairs with given sum hashing
creating triangle using nested loop