From 41cf4e46f22dc916ef78724fd15c57c27fa4cdbc Mon Sep 17 00:00:00 2001 From: Rakhee Singh Date: Sat, 27 Oct 2018 11:19:10 +0530 Subject: [PATCH 1/3] Added Code for Decimal To Binary --- Algorithms/DecToBinary.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Algorithms/DecToBinary.cpp diff --git a/Algorithms/DecToBinary.cpp b/Algorithms/DecToBinary.cpp new file mode 100644 index 000000000..e4c747edc --- /dev/null +++ b/Algorithms/DecToBinary.cpp @@ -0,0 +1,12 @@ +#include +using namespace std; + +int main() +{ + int n; + cin>>n; + bitset<32> binary(n); + cout< Date: Sat, 27 Oct 2018 11:21:18 +0530 Subject: [PATCH 2/3] Added a C++ program to convert Decimal To Binary --- Algorithms/DecToBinary.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Algorithms/DecToBinary.cpp b/Algorithms/DecToBinary.cpp index e4c747edc..124a30d40 100644 --- a/Algorithms/DecToBinary.cpp +++ b/Algorithms/DecToBinary.cpp @@ -1,6 +1,5 @@ #include using namespace std; - int main() { int n; From 98bc5db850948f5f5e591a1ef27957104b85e829 Mon Sep 17 00:00:00 2001 From: RakhiSingh2811 Date: Sat, 27 Oct 2018 11:25:14 +0530 Subject: [PATCH 3/3] Delete DecToBinary.cpp --- Algorithms/DecToBinary.cpp | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 Algorithms/DecToBinary.cpp diff --git a/Algorithms/DecToBinary.cpp b/Algorithms/DecToBinary.cpp deleted file mode 100644 index 124a30d40..000000000 --- a/Algorithms/DecToBinary.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include -using namespace std; -int main() -{ - int n; - cin>>n; - bitset<32> binary(n); - cout<