Ai
1 Star 1 Fork 0

Qzx/data-structure-course

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
p3.cpp 541 Bytes
一键复制 编辑 原始数据 按行查看 历史
Qzx 提交于 2023-03-23 13:53 +08:00 . MD_CPP
/*******************
输入字符串,四则运算
介绍请阅读 README.MD
language: C++
*******************/
#define _CRT_SECURE_NO_WARNINGS 1
#include "calculator.h"
using namespace std;
int main() {
// freopen("p3.in", "r", stdin);
string s; // 定义字符串
getline(cin, s); // 读入一行
s.erase(s.end() - 1); // 删除最后一位的无效 '#'
// cout << s << endl;
double ans = 0; // 存结果
if (CalculateStr(ans, s)) { // 字符串合法,得到结果
cout << ans << endl;
}
else { // 字符串不合法
cout << "error!\n";
}
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/Qzx3337/data-structure-course.git
git@gitee.com:Qzx3337/data-structure-course.git
Qzx3337
data-structure-course
data-structure-course
master

搜索帮助