Pagini recente » Cod sursa (job #1871943) | Cod sursa (job #2245610) | Diferente pentru problema/weightgraph intre reviziile 20 si 21 | Cod sursa (job #3278793) | 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;
}