UVA
来源:互联网 发布:淘宝订单数据 编辑:程序博客网 时间:2024/06/16 03:54
usingnamespacestd;
constint MAX = 2147483647;
intmain(){
char op, a[1100], b[1100];
while (cin >> a >> op >> b){
cout << a << " " << op << " " << b << endl;
double x = atof(a), y = atof(b);
if (x>MAX)
cout << "first number too big" << endl;
if (y>MAX)cout << "second number too big" << endl;
if (op == '+'){
double ans = x + y;
if (ans>MAX)
cout << "result too big" << endl;
}
if (op == '*'){
double ans = x*y;
if (ans>MAX)cout << "result too big" << endl;
}
}
return0;
}
阅读全文
0 0
- uva
- UVA
- UVA
- UVA
- uva
- UVA
- UVA
- UVA
- UVA
- UVA
- UVA
- UVA
- UVA
- UVA
- UVA
- UVA
- UVA
- UVA
- shell下function报错
- git ssh
- 基数排序和分组排序
- 2017年复合材料与高分子科学工程国际会议(CMPSE2017)
- 日拱一卒——160个crackme之#1
- UVA
- VS 2015版图标说明
- OpenGL实现摄像机漫游/三次贝塞尔曲线
- jQuery<3.3>
- 【机器学习】BP算法学习笔记
- ubuntu解决中文乱码问题
- KafkaProducer介绍
- easyui-datebox限制选择日期范围
- 欢迎使用CSDN-markdown编辑器