
int main()
{
int repeat,i,m,n,sum
for(scanf("%d",&repeat)repeat>0repeat--)
{
for(scanf("%d%d",&m,&n)m<nm++)
{
for(sum=0,i=1i<m++i)
{
if(m%i==0)
{
sum+=i
}
}
if(sum==m)
{
printf("%d ",m)
}
}
printf("\n")
}
return 0
}
int fun(int x ){
if(x<0 && x!=3)
return x*x+x+6
if((x>=0 && x<10) && (x!=2) && (x!=3))
return x*x - 5*x+6
return x*x-x-1
}
希望能帮到你,望采纳!
1.在WINDOWS平台:#include <stdio.h>
#include <conio.h>
int main(void)
{
char c
putchar(c)/*输出*/
return 0
}
2.在UNIX系统:
#include <stdlib.h>
#include <stdio.h>
int main(void)
{
char c
system("stty raw")/*将终端设置为每次读取一字符的模式*/
c=getchar()
system("stty cooked")/*恢复为每次一行*/
putchar(c)/*输出*/
return 0
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)