How to convert binary to decimal

后端 未结 6 2031
忘掉有多难
忘掉有多难 2020-12-05 07:21

How can I convert a binary string, such as 1001101 to Decimal? (77)

6条回答
  •  悲哀的现实
    2020-12-05 07:47

    string s=Console.ReadLine();
    
    int b=Convert.ToInt32(s,2);
    
    Console.WriteLine("Input value in base 10 = "+b);
    

    convert any binary to decimal. :)

提交回复
热议问题