这道题哪里错了??c++

宝贝浩然_0310 |浏览269次
收藏|2022/11/25 17:03

满意回答

2022/11/25 17:13

你的程序错在cout这句中,引号是全角的。另外提示内容也改为:请输入时间。修改后的程序如下:#include<iostream>#include<stdlib.h>using namespace std;int main(){int h;cout<<"Please enter the time:";cin>>h;if(h>0&&h<9)核世丰程坚么{printf("zaoshanghao,\n");}if(h>=9&&h<1按丰法怀研属2){printf("shangwuhao,\n");}if(h>12&&h<18){printf("xiawuhao,\n");}if(h>=18&&h<24){printf("wanshanghao, \n");}return 0;}你重孙话集封缺双可运行一下,程序的婷分构价看约几种运行结果也是正常的。

ygl990951

其他回答(1)
  • if(h>12&&h<1婷毛穿8)应该修改成if(h>=12&&h<18)
    回答于 2022/11/25 17:27
0人关注该问题
+1

 加载中...