The shortest way to convert infix expressions to postfix (RPN) in C

后端 未结 3 1851
一个人的身影
一个人的身影 2021-02-13 12:35

Original formulation is given here (you can try also your program for correctness) .

Additional rules:
1. The program should read from standard input and write to s

3条回答
  •  梦毁少年i
    2021-02-13 13:34

    Well, the real winner is the one who wrote this small code you provided, but you can slightly modify it to remove the exit:

    main(c){read(0,&c,1)?c-41&&main(c-40&&(c%96<27||main(c),putchar(c))):0;}
    

    I tried and it works.

提交回复
热议问题