mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-10 05:58:22 +08:00
Removed Others/Decimal To Binary.cpp
Recent updated version exists (Decimal To Binary.cpp)
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
#include<iostream>
|
||||
using namespace std;
|
||||
int main()
|
||||
{
|
||||
int number;
|
||||
cin>>number;
|
||||
int remainder,binary=0,var=1;
|
||||
|
||||
do{
|
||||
|
||||
remainder=number%2;
|
||||
number=number/2;
|
||||
binary=binary+(remainder*var);
|
||||
var=var*10;
|
||||
|
||||
|
||||
}
|
||||
while(number>0);
|
||||
cout<<binary;
|
||||
}
|
||||
Reference in New Issue
Block a user