FengYuXinMing @ 2022-09-14 19:24:57
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
char c;
cin >> a >> b >> c;
if (c == '+'){
cout << a + b;
}
else if (c == '*'){
cout << a * b;
}
else if (c == '-'){
cout << a - b;
}
else if (c == '/'){
if (b == 0){
cout << "Divided by zero!";
}
cout << a / b;+
}//这就是21行
else{
cout << "Invalid operator!";
}
return 0;
}
by HopesandDreams @ 2022-09-14 19:37:57
@hutongyu 你只需要知道,你RE了。
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
char c;
cin >> a >> b >> c;
if (c == '+'){
cout << a + b;
}
else if (c == '*'){
cout << a * b;
}
else if (c == '-'){
cout << a - b;
}
else if (c == '/'){
if (b == 0){
cout << "Divided by zero!";
}
else cout << a / b;
}
else{
cout << "Invalid operator!";
}
return 0;
}
by FengYuXinMing @ 2022-09-14 19:38:40
@114514YC 请问是哪位,这人太多了,不过谢谢您
by HopesandDreams @ 2022-09-14 19:39:31
@hutongyu @Wildchesse
by Raymondzll @ 2022-09-14 19:45:43
@hutongyu 我觉得吧,他们对你态度不太好,一是因为你有点自以为是,二是因为你有点不虚心接受别人的指正。
by HarryKane @ 2022-09-14 19:49:30
@hutongyu 洛谷新用户指南是摆设是吧
by FengYuXinMing @ 2022-09-14 19:51:35
@114514YC 我知道他说的是对的,我也不是态度不好,其实一直都没有阴阳怪气,就是那样发一下而已,真的
by FengYuXinMing @ 2022-09-14 19:55:15
@HarryKane 想现在搜不到新用户了,我当时看了,我前面说的话有违规吗?有的话我道歉,对了,您有新用户的网址吗?我再看一眼(原来那个人骂人应该不行吧)
by FengYuXinMing @ 2022-09-14 19:56:26
@Raymondzll 请问哪里自以为是了(没有质问您,您别理解错了)
by Raymondzll @ 2022-09-14 19:59:08
啊我也没有误解(
真当我瞎啊,
洛谷目前我知道只有: AC,WA,TLE,RE
by cxqghzj @ 2022-09-14 22:46:47
你说得对,不过Dev是IDE不是编译器()