Closed chakku000 closed 5 years ago
In the example of 05-lex-yacc, when the DIV is used, the divisor and dividend was not correct. The divisor is used as the dividend and the dividend is used as divisor. So, ./main.native 1/2 outputs 2, and ./main.native 2/1 outputs 0.
./main.native 1/2
2
./main.native 2/1
0
And, I change the divisor and dividend.
Indeed! Thanks, I have no idea where the mistake came from.
In the example of 05-lex-yacc, when the DIV is used, the divisor and dividend was not correct. The divisor is used as the dividend and the dividend is used as divisor. So,
./main.native 1/2
outputs2
, and./main.native 2/1
outputs0
.And, I change the divisor and dividend.