Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
为什么总是Runtime error 求帮助#include <stdio.h> int main() { int a,b[1000],i,p,j,temp; scanf("%d",&a); for(i=0;i<a;i++) scanf("%d",&b[i]); for(p=0;p<a;p++) { for( j=a-1;j>p;j--) if(b[j]<b[j-1]) { temp=b[j-1]; b[j-1]=b[j]; b[j]=temp; } } printf("%d\n",b[a/2]); return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator