第22747题 单选题
下面C++代码执行后,求出几天后星期几。如果星期日则输出"星期天"否则输出形如"星期1"。横线上应填入的代码是( )。
int N, nowDay, afterDays;
cout << "今天星期几?" <<endl;
cin >> nowDay;
cout << "求几天后星期几?"<< endl;
cin >>afterDays;

N = nowDay+afterDays;

if( )
printf("星期天");
else
printf("星期%d", N%7);
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析