编辑代码

using System;

public class HelloWorld
{
    public static void Main()
    {
    string cpucode="EADC53";  //机器码
    /*****/
    string str2 = cpucode.Substring(cpucode.Length - 3, 3); 
    Console.WriteLine("str2: {0}",str2); 
    Console.WriteLine("11: {0}",cpucode.Substring(cpucode.Length - 6, 3) );
    Console.WriteLine("1 {0}",Convert.ToInt64(cpucode.Substring(cpucode.Length - 6, 3), 0x10)); //EAD 3757
    Console.WriteLine("2 {0}",Convert.ToInt64(str2, 0x10).ToString());          //C53 3155            
    string str3 = (Convert.ToInt64(cpucode.Substring(cpucode.Length - 6, 3), 0x10) * Convert.ToInt64(str2, 0x10)).ToString();
    Console.WriteLine("str3 {0} ",str3);  // EAD * C53   = 11853335
    string str4 = str3;
    while (str3.Length < 6)
    {
        str3 = "0" + str3;
    }
     Console.WriteLine("str4:{0}",Convert.ToInt32(str4));
    Console.WriteLine("str4 * 44618180 {0}",((Convert.ToInt32(str4) * 44618180)+44618180));
    Console.WriteLine ("注册码: {0}",((Convert.ToInt32(str4) * 44618180) + 44618180).ToString().Substring(0, 6) + str3.Substring(str3.Length - 6, 6));
       /****/
       //JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。
      //  Console.WriteLine(cpucode);
    }
}