int main(int argv,char *argc[]){
int n,m
for(n=32n<100n++)
if((m=n*n)%10==m/10%10 && m/1000==m/100%10)
printf("%d\n",m)
return 0
}
运行结果:
#include<stdio.h>int main()
{
char s[2048], n[2048], tmp = '\0'
int i =0, j = 0
scanf("%s", s)
tmp = s[0]
n[0] = s[0]
for (i = 1, j=1 i < strlen(s) i++) {
if (tmp == s[i])
continue
n[j++] = s[i]
tmp = s[i]
}
printf("%s\n", n)
return 0
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)