Pagini recente » sport3 | Diferente pentru problema/hoata2 intre reviziile 81 si 80 | Cod sursa (job #1870736) | Cod sursa (job #506854) | Cod sursa (job #11572)
Cod sursa(job #11572)
#include<fstream.h>
#include<string.h>
#define input "text.in"
#define output "text.out"
int main()
{
ifstream fin(input);
char b;
int s,n,i,x,ant=0;
s=0;
while( !fin.eof() )
{
fin.get(b);
x=int(b);
if(x>=65&&x<=90||x>=97&&x<=122)
{
ant=1;
n++;
}
else
if(ant)
{
ant=0;
s++;
}
}
ofstream fout(output);
fout<<n/s;
return 0;
}