第23085题 单选题
以下C++代码用于计算星期六后第N天的星期数,横线处应填入的代码是?

已知今天是星期六,求其后第N天的星期数。若结果为星期天则输出“星期 天”,星期一到星期六则输出“星期X”(X为1-6)。现有如下C++代码实现该需求,请补全横线处的代码:

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