#include<stdio.h>
#define SIZE 10
double stack[SIZE];
int sp;
void push(double value);
double pop(void);
int isFull(void);
int isEmpty(void);
void answer(void);
void reset(void);
int main(void)
{
reset();
int a,b,t=0;
double x;
int data;
while(t==0){
switch(data){
case 1:
a=pop();
b=pop();
x=a+b;
push(x);
break;
case 2:
a=pop();
b=pop();
x=a-b;
push(x);
break;
case 3:
a=pop();
b=pop();
x=a*b;
push(x);
break;
case 4:
a=pop();
b=pop();
if (b == 0) {
break;
}
else{
x=a/b;
push(x);
break;
}
case 5:
push(x);
break;
case 9:
answer();
t=1;
break;
}
}
return 0;
}
void push(double value)
{
if(isFull()){
}
else{
stack[sp]=value;
sp++;
}
}
double pop(void){
if(isEmpty()){
}
else{
sp--;
stack[sp];
}
return stack[sp];
}
int isFull(void) {
return sp >= SIZE;
}
int isEmpty(void) {
return sp <= 0;
}
void answer(void) {
int x;
if (isEmpty()) {
}
else {
x=1+2;
}
}
void reset(void)
{
sp=0;
}
I2luY2x1ZGU8c3RkaW8uaD4KCiNkZWZpbmUgU0laRSAxMApkb3VibGUgc3RhY2tbU0laRV07CmludCBzcDsKCnZvaWQgcHVzaChkb3VibGUgdmFsdWUpOwpkb3VibGUgcG9wKHZvaWQpOwppbnQgaXNGdWxsKHZvaWQpOwppbnQgaXNFbXB0eSh2b2lkKTsKdm9pZCBhbnN3ZXIodm9pZCk7CnZvaWQgcmVzZXQodm9pZCk7CgoJaW50IG1haW4odm9pZCkKewogCXJlc2V0KCk7CglpbnQgYSxiLHQ9MDsKCWRvdWJsZSB4OwoJaW50IGRhdGE7CgkJd2hpbGUodD09MCl7CgkJCXNjYW5mKCIlZCIsJmRhdGEpOwoJCXN3aXRjaChkYXRhKXsKICAgICAgIGNhc2UgMToKCQkJCWE9cG9wKCk7CgkJCQliPXBvcCgpOyAKCQkJCXg9YStiOwoJCQkJcHVzaCh4KTsKCQkJCXByaW50ZigiZGF0YTslbGZcbiIseCk7CgkJCQlicmVhazsKCQljYXNlIDI6CgkJCQlh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