0
how to convert decimal number to binary.
I want a code that convert a decimal number to binary number.
2 Réponses
+ 2
using System;
namespace Binary
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter decimal:");
int value=Convert.ToInt32(Console.ReadLine());
string BinaryCode=Convert.ToString(value,2);
Console.WriteLine("Binary Code: " +BinaryCode);
Console.Read();
}
}
}
+ 1
see my code
https://code.sololearn.com/cPLs2plCWH4s/?ref=app