I am very enjoyed for this blog. Its an informative topic. It help me very much to solve some problems. Its opportunity are so fantastic and working style so speedy
FOR MORE DETAILS.
Following C# program is to convert the Binary number into Decimal number,
using System;
public class Program
{
public static void Main()
{
int binary;
int weight=1;
int number=0;
int rem;
Console.WriteLine('enter the binary number');
binary=int.Parse(Console.ReadLine());
while(binary!=0)
{
rem=binary%10;
number=number+rem*weight;
binary=binary/10;
weight *=2;
}
Console.WriteLine('Decimal number is :'+number);
}
}
Output:
enter the binary number
111111
Decimal number is :63
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
I am very enjoyed for this blog. Its an informative topic. It help me very much to solve some problems. Its opportunity are so fantastic and working style so speedy FOR MORE DETAILS.
Following C# program is to convert the Binary number into Decimal number,
Output: