//
// Created by 蒲贺良 on 2022/8/29.
//
#include <iostream>
using namespace std;
bool iseql(int i)
{
int a = i / 100;//百位
int b = i % 100/10;//十位
int c = i % 100 % 10;//个位
if(a==b)
return true;
else if(a==c)
return true;
else if(b==c)
return true;
}
bool x2(int i)
{
for(int j = 1;j<100;j++)
{
if(i==j*j)
return true;
}
}
int main()
{
for(int i = 100;i<1000;i++)
{
if(iseql(i)&&x2(i))
{
cout<<i<<' ';
}
}
}
你是不是两个cpp 里面都有main?
iseql函数最后要加一句return false;x2函数也是一样