#include"iostream" using namespace std; int main() { char a,b; a=getchar(); if(a==✀m✀) cout<<"monday

在二级判断中,有错误输出,求指导。
2025-02-25 18:41:52
推荐回答(4个)
回答1:

你用的开发工具是什么?vc 6.0 吗?我在FreeBSD下编译运行了,没有任何问题。getchar()函数返回的就是int 类型的,‘m’作为字符类型可以隐士转换为 int 类型。

回答2:

#include"iostream"
using namespace std;
int main() {
char a,b;
a=getchar();
if(a=='m') cout<<"monda";
return 0;
}照你说的这样可以运行未发现错误啊

回答3:

#include

回答4:

你的分号怎么是中文的啊