瑞星卡卡安全论坛技术交流区系统软件 请问这个程序有什么问题吗?

1   1  /  1  页   跳转

请问这个程序有什么问题吗?

请问这个程序有什么问题吗?

#include"stdlib.h"
main()
{int *p,*m,*n,t;
p=(int*)malloc(2);
m=(int*)malloc(2);
n=(int*)malloc(2);
scanf("%d",p);
scanf("%d",m);
scanf("%d",n);
if(*p>*m){t=*p;*p=*m;*m=t;}
if(*p>*n){t=*p;*p=*n;*n=t;}
if(*m>*n){t=*m;*m=*n;*n=t;}
printf("%d%d%d",*p,*m,*n);
}
最后编辑2007-02-16 09:39:11
分享到:
gototop
 

从小到大排列!
gototop
 

"malloc.h"试试
gototop
 

古老的C啊...
gototop
 
1   1  /  1  页   跳转
页面顶部
Powered by Discuz!NT