Pagini recente » Cod sursa (job #771374) | Cod sursa (job #1762467) | Cod sursa (job #1675992) | Cod sursa (job #1604785) | Cod sursa (job #150918)
Cod sursa(job #150918)
#include<fstream.h>
#include<iomanip.h>
#include<string.h>
#include<stdio.h>
long int i,j,k,l;
char x[600000];
int main(){
ifstream f("text.in");
ofstream g("text.out");
while(!f.eof()){
f/*>>resetiosflags(ios::skipws)*/>>x;
k=strlen(x);
for(i=0;i<k;i++)
{if(((x[i]>='A')&&(x[i]<='Z'))||((x[i]>='a')&&(x[i]<='z')))
{j++;
while(((x[i]>='A')&&(x[i]<='Z'))||((x[i]>='a')&&(x[i]<='z')))
{l++;i++;}
}
}}
l/=j;
g<<l;
f.close();
g.close();
return 0;
}