From dae217441900d5e4960496f28804beb583fc1b1b Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Sat, 18 Dec 2021 15:00:09 +0800 Subject: 4.10 --- 4/10.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to '4') diff --git a/4/10.c b/4/10.c index a57effb..769e606 100644 --- a/4/10.c +++ b/4/10.c @@ -24,6 +24,15 @@ void clear(); int mgetline(); int getop(char[]); +/* Reverse Polish notation calculator + - single uppercase and lowercase characters are variables (syntax 2 A =); + - special variable LOUT for the last printed value. + - mathematical functions: sin, cos, tan, exp, pow. + - custom functions: swp (swap top 2 values), dup (duplicate last value), + top (peek at the stack top), cls (clear stack). + - operators: +, -, *, /, % and = + - press enter to print the value at the top of the stack. + */ int main(int argc, char *argv[]) { int type, op1, op2; char s[MAXOP]; -- cgit v1.2.3