Pagini recente » Cod sursa (job #1946412) | Cod sursa (job #1133179) | Cod sursa (job #2978658) | Cod sursa (job #2497164) | Cod sursa (job #1794933)
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
char s[1024*1024+5],t,*p,sep[]=" ,.-?!;:'({)}1234567890|][`~@#$%^&*_+=";
int i,nr,l;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
gets(s);
p=strtok(s,sep);
while(p!=NULL){
printf("%s\n", p);
l+=strlen(p);
nr++;
p=strtok(NULL,sep);
}
printf("%d %d\n", l, nr);
printf("%d",l/nr);
return 0;
}