Cod sursa(job #644230)
| Utilizator | Data | 5 decembrie 2011 18:02:15 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.43 kb |
#include<stdio.h>
#include<iostream>
#include<string>
using namespace std;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
int nr,a,b;
char s[1025], *p, aux[1025];
cin.get(s,100);
aux[0]=0;
a=0;
nr=0;
p=strtok(s," ,.-;:!?01234\"\'56789");
while(p)
{
nr++;
a=a+strlen(p);
p=strtok(NULL," ,.-;:!?01234\"\'56789");
}
nr=a/nr;
printf("%d", nr);
return 0;
}
