#include<cstdio>
#include<iostream>
using namespace std; int main()
{
//freopen("input.txt","r",stdin);
int a,b;
char op;
int T;
cin>>T;
while(T--)
{
cin>>op>>a>>b;//此处因为scanf问题 所以换成C++输入,应该是忘了getchar()的问题吧
switch(op)
{
case '+':
cout<<a+b<<endl;
break;
case '-':
cout<<a-b<<endl;
break;
case '*':
cout<<a*b<<endl;
break;
case '/':
if(a%b==) cout<<a/b<<endl;
else printf("%.2f\n",(float)a/(float)b);//不建议混用C、c++输入输出
break;
}
} return ;
}

hdu 1.2.7的更多相关文章

  1. HDOJ 2111. Saving HDU 贪心 结构体排序

    Saving HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total ...

  2. 【HDU 3037】Saving Beans Lucas定理模板

    http://acm.hdu.edu.cn/showproblem.php?pid=3037 Lucas定理模板. 现在才写,noip滚粗前兆QAQ #include<cstdio> #i ...

  3. hdu 4859 海岸线 Bestcoder Round 1

    http://acm.hdu.edu.cn/showproblem.php?pid=4859 题目大意: 在一个矩形周围都是海,这个矩形中有陆地,深海和浅海.浅海是可以填成陆地的. 求最多有多少条方格 ...

  4. HDU 4569 Special equations(取模)

    Special equations Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u S ...

  5. HDU 4006The kth great number(K大数 +小顶堆)

    The kth great number Time Limit:1000MS     Memory Limit:65768KB     64bit IO Format:%I64d & %I64 ...

  6. HDU 1796How many integers can you find(容斥原理)

    How many integers can you find Time Limit:5000MS     Memory Limit:32768KB     64bit IO Format:%I64d ...

  7. hdu 4481 Time travel(高斯求期望)(转)

    (转)http://blog.csdn.net/u013081425/article/details/39240021 http://acm.hdu.edu.cn/showproblem.php?pi ...

  8. HDU 3791二叉搜索树解题(解题报告)

    1.题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=3791 2.参考解题 http://blog.csdn.net/u013447865/articl ...

  9. hdu 4329

    problem:http://acm.hdu.edu.cn/showproblem.php?pid=4329 题意:模拟  a.     p(r)=   R'/i   rel(r)=(1||0)  R ...

  10. HDU 2586

    http://acm.hdu.edu.cn/showproblem.php?pid=2586 题意:求最近祖先节点的权值和 思路:LCA Tarjan算法 #include <stdio.h&g ...

随机推荐

  1. postfix 如何设置邮件头翻译的功能

    开始按http://semi-legitimate.com/blog/item/how-to-rewrite-outgoing-address-in-postfix 博客中的方法进行设置,是可以替换, ...

  2. WIN7成功安装Qt4.8方法,无需VS支持

    下载地址:http://pan.baidu.com/share/link?shareid=159827&uk=4010603727 安装Qt方法 安装准备:1. qt-win-opensour ...

  3. Lazarus IOCP 移植

    delphi下面有一个高性能IOCP库,是俄国人写的,在下将其移植到了lazarus下面, lazarus 版本 1.0.12 ,需要的下载 和indy相比较,indy开发的一个web服务器,cpu占 ...

  4. L与_T

    https://www.cnblogs.com/xxn-180727/p/9378519.html _T( ) 是一个适配的宏,当工程采用Unicode字符时 _T()就是 L,会将多字节的字符串转化 ...

  5. Maximum Product Subarray LT152

    Given an integer array nums, find the contiguous subarray within an array (containing at least one n ...

  6. css初识和css选择器

    一.css是什么 css(cascading style sheet)定义如何显示HTML元素,给HTML设置样式,显得更为美观. 二.css的引入方式 1.行内引入 在标签中添加一个style是属性 ...

  7. centos7修改root根目录

    1.拷贝/root 原目录的东西到新目录中(包括.xxx文件) /abc 2.修改配置文件 vi /etc/passwd root:x:0:0:root:/root:/bin/bash ==> ...

  8. 手机上输入http://192.168.1.102:8888/FiddlerRoot.cer为什么下载不了证书

    因为之前你的手机可能已经安装了该证书,所以再次下载会说找不到证书 解决办法:如果你遇到上面的问题,就可能是证书的问题(我的本地证书是用系统生成证书的一个软件生成的个人证书,所以出现了问题),操作步骤如 ...

  9. from __future__ import

    读代码的过程中看到的,好奇搜索了一下,其实当在我们调试别人Python代码的过程中经常会遇到一些问题,比如版本不同,代码也会有所改变,比如print函数 Python 2.7版本为 print “ ” ...

  10. ASP项目部署IIS7.5中遇到的问题

    我们大家都熟悉了tomcat服务器的部署,如果是一个ASP项目如何部署呢.这也是我在客户现场遇到的问题.ASP项目一般是用的系统组件IIS来部署项目.下面我讲一下自己在部署过程中遇到的问题. 如果在网 ...