rename Others -> others (#648)

* rename Others -> temp

* rename Others -> others
This commit is contained in:
Christian Clauss
2019-11-28 13:29:54 +01:00
committed by GitHub
parent 6fe40bd0a2
commit ac1ba3a613
19 changed files with 141 additions and 141 deletions

View File

@@ -0,0 +1,25 @@
// This function convert decimal to binary number
//
#include <iostream>
using namespace std;
int main()
{
int number;
cout << "Enter a 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 << "the binary is :";
cout << binary;
cout << endl;
return 0;
}