第19275题 单选题
补全获取正整数N从右数第M位(个位为第1位)的C++代码横线处表达式

约定个位数为第1位,如N等于1234,M等于2,则输出3。假设M的值是大于等于1且小于等于N的位数。

int N, M, div=1;
cout << "请输入一个正整数:";
cin >> N;
cout << "请输入从右到左取第几位数:";
cin >> M;
for (int i =0; i < (M - 1); i++) div *= 10;
cout << (______________)
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析