0

how to convert decimal number to binary.

I want a code that convert a decimal number to binary number.

20th Oct 2016, 2:17 PM
Abhay
Abhay - avatar
2 Answers
+ 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(); } } }
20th Oct 2016, 3:11 PM
Nadezhda
29th Apr 2017, 12:47 AM
P∆WAN M∆URY∆
P∆WAN M∆URY∆ - avatar