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 |
Hawk同学帮帮忙,负的数据在算的时候怎么删除呀?我的程序支队出发时间为正的情况正确: #include <stdio.h> #include <math.h> int f(int a,int b) { float c; c=4.5/a*3600+b; return (int)c+1; } void main () { int a,x[10000],y[10000],z[10000],i,j,min; scanf("%d",&a); while(a!=0){ for(i=0;i<a;i++) { scanf("%d %d",&x[i],&y[i]); z[i]=f(x[i],y[i]); } min=z[0]; for(j=1;j<a;j++) if(min>z[j]) min=z[j]; printf("%d\n",min); scanf("%d",&a); } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator