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;
}选项(单选)
答案解析
详细答案解析为会员权益,按每日次数查看。
开通 / 升级会员