#include "iostream.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
void main()
{
FILE *file1=fopen("C://Documents and Settings//Administrator//桌面//新建文件夹//工程//yaoqiu//11.txt","r+");
int ps=0,n=0;
char ch=' ',ch1=' ';
float f,m=0;
char *str = new char();
while ((ch= fgetc(file1))!= EOF)
{
if(ch>47&&ch<58||ch==46)
{
if(ch1>47&&ch1<58||ch1==46)
goto stop;
else
ps++;
ch1=ch;
}
else
stop: ch1=ch;
//寻找最大浮点数;
if(ch>47&&ch<58||ch==46)
{str[n]=ch;
n++;
}
else
{
f = atof(str);
if(f>m)
m=f;
for(int i=0;i<n;i++)
{
str[i]=' ';
}
n=0;
}
}
if(ch>47&&ch<58||ch==46)
{
if(ch1>47&&ch1<58||ch1==46)
goto stop1;
else
ps++;
ch1=ch;
}
else
stop1: ch1=ch;
//寻找最大浮点数;
if(ch>47&&ch<58||ch==46)
{str[n]=ch;
n++;
}
else
{
f = atof(str);
if(f>m)
m=f;
for(int i=0;i<n;i++)
{
str[i]=' ';
}
n=0;
}
cout<<ps<<endl;
cout<<m<<endl;
//delete str;
fclose(file1);
}