Pagini recente » Cod sursa (job #636764) | Istoria paginii utilizator/stefania.popescu | Cod sursa (job #972743) | Profil latrisha3163 | Cod sursa (job #488085)
Cod sursa(job #488085)
#include<iostream.h>
#include<string.h>
#include<fstream.h>
#include<ctype.h>
ifstream f("text.in");
ofstream g("text.out");
main ()
{
char text[100000],*p,s[]="_ 1234567890,.?/!;\'-@#$%^&*(){}[]|:<>+~`",contl=0,contc=0;
int i;
f.get(text,100000);
p=strtok(text,s);
while(p!=NULL)
{
if(p!=NULL)
{
contl=contl+strlen(p);
contc++;
}
p=strtok(NULL,s);
}
g<<contl/contc;
}