第37635题 单选题
以下C++代码判断输入的正整数是否为质数,如果该数字是质数,则输出YES,否则输出NO。质数是指仅 能被1和它本身整除的正整数。请在横线上填写代码。( )
int num, i;
cin >> num;
for(i = 2; i < num; i++)
    if (__________){
        cout << ("NO");
        break;
    }
if(i == num)
    cout << ("YES");
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
知识点:
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析