问题相关部分http://topic.csdn.net/u/20091028/08/0302b433-6673-4700-a926-8ae681a2c217.html?1590745515
各位继续帮忙吧, 十六进制                                  十进制 
70 2(3 4 5 6 7)                -5 5 -50 50 -500 500 
70 A(B C D E F)                -6 6 -60 60 -600 600 
71 2(3 4 5 6 7)                  .... 
71 A(B C D E F) 
72 2(3 4 5 6 7) 
72 A(B C D E F) 
73 2(3 4 5 6 7) 
73 A(B C D E F) 
74 2(3 4 5 6 7) 
74 A(B C D E F) 
75 2(3 4 5 6 7) 
75 A(B C D E F) 
76 2(3 4 5 6 7) 
76 A(B C D E F) 
77 2(3 4 5 6 7)                    .... 
77 A(B C D E F)                  -20 20 -200 200 -2000 2000 同样的问题:0x702 表示十进制的-5 ,0x703表示5,0x704表示-50,0x705表示50,0x706表示-500, 
0x707表示500,以此类推,直到2000. 
求之间的对应函数!
再次感谢各位!

解决方案 »

  1.   

    (永不言弃),wartim
     等高手帮忙啊
      

  2.   

    你确信你给的是16进制数?
    16进制的话,你的“:0x702 表示十进制的-5 ,0x703表示5,0x704表示-50,0x705表示50,0x706表示-500,
    0x707表示500,以此类推,直到2000. ”
    都是不对的!
    比如0x702换成十进制,转换算法是这样的
    7*16^3(^表示乘方)+0*16^2+2*16^1=7*16^3+2*16
      

  3.   

    Google搜索一个16转10的函数不就可以了么
      

  4.   

    呵呵,看看我以前的帖子别人的回答
    http://topic.csdn.net/u/20091028/08/0302b433-6673-4700-a926-8ae681a2c217.html?1590745515
      

  5.   

    这样简单的对应关系可以表示如下:
    const int M=702;int GetMapNum(int x)
    {
      int sing=(((x%M)+1)%2)==0?1:-1;//根据输入的数据X求出符号
      int tail=power(10,(x-M)/2);    //根据输入的数据,求出10的几次方
      return sing*5*tail;            //返回计算的数据;
    }不知道对不对
      

  6.   

    那帖子里最后已经回答你了
    using System;
    using System.Collections.Generic;
    using System.Text;namespace ConsoleApplication34
    {
        class Program
        {
            static void Main(string[] args)
            {
                int[] A = new int[] { 0x702, 0x703, 0x704, 0x705, 0x706, 0x707, 
                    0x70A, 0x70B,0x70C,0x70D,0x70E,0x70F,
                    0x712, 0x713, 0x714, 0x715, 0x716, 0x717};            GetIt(A, 0x702, 4, 0x2, 0x8, 0x1);            Console.Read();
            }        static void GetIt(int[] A, int StartNumber, int StartIndex, int SignStep, int OrderStep, int ValueStep)
            {
                for (int i = 0; i < A.Length; i++)
                {
                    int Sign = A[i] % SignStep == 0 ? -1 : 1;
                    int Order = (A[i] - StartNumber) / OrderStep;
                    int Temp = (A[i] - (StartNumber + Order * OrderStep)) / ValueStep;
                    int Value = (int)Math.Pow(10, Temp / 2);
                    Console.WriteLine(String.Format("0x{0:X3}:{1}", A[i], Sign * (StartIndex + Order + 1) * Value));
                }
            }
        }
    }
      

  7.   


    public double myHexToInt2(int hex)
    {
        int hex0 = 0x702;
        double d = ((hex - hex0) % 2 == 0) ? -1 : 1;    //算符号
        d = d * ((hex - hex0) / 8 + 5);                  //算序号
        d = d * (Math.Pow(10, ((hex - hex0) % 8 / 2)));  //算指数
        return d;
    }//测试用例
    private void button2_Click(object sender, EventArgs e)
    {
        MessageBox.Show(myHexToInt2(0x705).ToString());
    }