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

A62556. 阅读下面的C++程序,分别输入两个整数 73和 77,则输出的结果分别为( )#include<bits/stdc++.h>

单选题

题目描述

阅读下面的C++程序,分别输入两个整数 73和 77,则输出的结果分别为(   )

#include<bits/stdc++.h>
using namespace std;
int n;
bool f(int x)
{
    for(int i=2;i*i<x;i++)
        if(x%i==0) return 0;
    return 1;
}
int main()
{
    cin>>n;
    if(f(n))cout<<l<<end1;
    else if(n%2==0)cout<<2<<end1;
    else if(f(n-2))cout<<2<<end1;
    else cout<<3<<endl;
    return 0;
}

选项(单选)