上传者: u011098035
|
上传时间:2025/7/5 3:21:37
|
文件大小:2KB
|
文件类型:java
RPN计算器java代码
RPN计算器ProgramInputEachlineoftheinputfile(prob12.in)containsaseriesofnumbersandoperators.TheprogrammustevaluatetheselinesasRPNexpressions.Alltokensareseparatedbyoneormorespaces.Numbersmaybenegative.Validoperatorsare+(addition),-(subtraction),*(multiplication)and/(division).ThelastlineofthefilecontainsonlythewordEND:1637+*432.12513–*20+5–3*42/631–/++ENDProgramOutputTheprogramwillprintthecomputedresultofeachRPNexpressiononaseparateline.16096.5-10
本软件ID:5595241