摘要:
#include<stdio.h>#define INF 100000000int main(){ FILE *fin,*fout; fin=fopen("data.in","rb"); fout=fopen("data.out","wb"); int x,n=0,mn=INF,mx=-INF,s=0; while(fscanf(fin,"%d",&x)==1) { s+=x; if(x>mx) mx=x; if(x<mn) mn=x; n++; } ... 阅读全文