标签:pad case ott order break round -- acm hdu
水题
#include<cstdio> char s[10]; int T,a,b,res; int main() { scanf("%d",&T); while(T--) { scanf("%s%d%d",s,&a,&b); switch (s[0]) { case ‘+‘ : printf("%d\n",a+b); break; case ‘-‘ : printf("%d\n",a-b); break; case ‘*‘ : printf("%d\n",a*b); break; case ‘/‘ : if(a%b) printf("%.2lf\n",(double)a/b); else printf("%d\n",a/b); break; } } return 0; }
hdu ACM Steps 1.2.8 Balloon Comes!
标签:pad case ott order break round -- acm hdu
原文地址:http://www.cnblogs.com/invoid/p/6986462.html