**杭电oj 1237**
#include <iostream>
#include <cstdio>
#include <stack>
#include <algorithm>
#include <cstring>
#include <string>
using namespace std;
int main()
{
double a;
stack<double> c;
stack<char> b;
while(~scanf("%lf",&a))
{
double i;
char d,e;
double a1,a2,b1;
e=getchar();
if(a==0&&e=='\n'&&b.size()==0)
{
while(c.empty()!=true)
{
c.pop();
}
while(b.empty()!=true)
{
b.pop();
}
break;
}
else if(e=='\n')
{
if(b.size()&&b.top()=='-')
{
a=a*-1;
c.push(a);
}
else
c.push(a);
if(b.size()&&b.top()=='*')
{
i=c.top();
c.pop();
i=i*c.top();
c.pop();
c.push(i);
b.pop();
}
else if(b.size()&&b.top()=='/')
{
i=c.top();
c.pop();
i=c.top()/i;
c.pop();
c.push(i);
b.pop();
}
while(b.size())
{
a1=c.top();
c.pop();
a2=c.top();
c.pop();
a1+=a2;c.push(a1);
b.pop();
}
printf("%.2lf\n",c.top());
continue;
}
d=getchar();
if(b.size()&&b.top()=='-')
{
a=a*-1;
c.push(a);
}
else
c.push(a);
if(b.size()&&b.top()=='*')
{
i=c.top();
c.pop();
i=i*c.top();
c.pop();
c.push(i);
b.pop();
}
else if(b.size()&&b.top()=='/')
{
i=c.top();
c.pop();
i=c.top()/i;
c.pop();
c.push(i);
b.pop();
}
b.push(d);
getchar();
}
return 0;
}