#include <stdio.h>

main(argc, argv)
	int argc;
	char **argv;
{
	int i,ii,fds,fdo,maxcount,dt[4000],low_d,high_d;
	char d,dd[30];
	float ff;

	if(argc==1){ printf("\nplease input source file name.\n"); exit(0); }
	fds=fopen(argv[1],"rb");
	if(fds==NULL){ 	printf("\nsource file is not found.\n"); exit(0); }
	i=0;
	while(1){
		d=fgetc(fds);
		if(d==0x0d) break;
		dd[i++]=d;
	}
	dd[i]=0;
	maxcount=atoi(dd);
	low_d=750; high_d=750;
	for(ii=0;ii<maxcount;ii++){
		i=0;
		while(1){
			d=fgetc(fds);
			if(d==0x0d) break;
			if(d!=0x0a) dd[i++]=d;
		}
		dd[i]=0;
		if(strlen(dd)==2){
			dt[ii]=100*(dd[0]-'0')+10*(dd[1]-'0');
		}
		else if(strlen(dd)==4){
			dt[ii]=100*(dd[0]-'0')+10*(dd[1]-'0')+(dd[3]-'0');
		}
		else{
			printf("\nline=%d, data%s",ii+1,dd);
			dt[ii]=0;
		}
	/*	printf("[%04d]=%s[%d]  ",ii+1,dd,dt[ii]);	*/
		if(dt[ii]<low_d) low_d=dt[ii];
		if(high_d<dt[ii]) high_d=dt[ii];
	}
	printf("\nFile name = %s : ",argv[1]);
	printf("Counts = %04d , ",maxcount);
	printf("Highest = %02.1f , ",high_d/10.0);
	printf("Lowest = %02.1f",low_d/10.0);

	fclose(fds);
}

