测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A62554. 阅读下面的C++程序,输出的结果为( )#include<bits/stdc++.h>

单选题

题目描述

阅读下面的C++程序,输出的结果为(   )

#include<bits/stdc++.h>
using namespace std;
int i,n,ans;
int main()
{
    i=1;
    while(1)
    {
        i++;
        if(i%7!=0) continue;
        int cnt=0;
        for(int j=2;j<i;j++)
            if(i%j==0)cnt++;
        if(cnt==6)
        {
            ans=i;
            break;
        }
    }
    cout<<ans;
    return 0;
}

选项(单选)