0
已解决
为啥我的代码报错???
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<string>
int int1(int i) {
int m=0;
if (i==1)
return m;
else {
for(int j=2; j<sqrt(i); j++) {
if (i%j==0)
m=m+1;
}
return m;
}
}
int main() {
int m,k=0;
cin>>m;
for(int i=1; i<=m/2; i++) {
if (int1(i)==0&&int1(m-i)==0)
k=k+1;
}
cout<<k;
}
显示
[Error] 'cin' was not declared in this scope
[Error] 'cout' was not declared in this scope
?????
李致远在2020-03-01 21:25:31追加了内容
我只要报错原因啦
0
已采纳
1
0
0

