求一四则运算解法
假设表达式如下:字符串形式
((((N)-(G))-((F)-(E)))-(((J)-(O))-(((C)-(L))-(B))))-(((I)-(K))-(((A)-(M))-((H)-(D))))
需求:找出正数字母和负数字母,求好解法。
[解决办法]
//只要计算出来就全部知晓了!#define MY_EXPRESSION(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O) \((((N)-(G))-((F)-(E)))-(((J)-(O))-(((C)-(L))-(B))))-(((I)-(K))-(((A)-(M))-((H)-(D))))#define MY_BIT_VALUE 0x7FFFF // 0111 1111 1111 1111//比如获得A的符号int mysign = MY_EXPRESSION(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0);//获得B的符号mysign = MY_EXPRESSION(0,1,0,0,0,0,0,0,0,0,0,0,0,0,0);//...