#include<stdio.h>
int isTongGou(int num){
int bFlage=0;
if(num>=0&&num<=9){
if((num*num)%10==num){
bFlage=1;
}
}else if(num>=10&&num<=99){
if((num*num)%100==num){
bFlage=1;
}
}else if(num>=10&&num<=99){
if((num*num)%100==num){
bFlage=1;
}
}
return bFlage;
}
void main(){
int i;
printf("1到100之间的同构数是:\n");
for(i=1;i<=100;i++){
if(isTongGou(i)==1){
printf("%d^2=%d\n",i,i*i);
}
}
}
温馨提示:答案为网友推荐,仅供参考