Cod sursa(job #78693)
| Utilizator | Data | 19 august 2007 00:52:17 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.46 kb |
#include <fstream.h>
#include <string.h>
int main()
{
char linie[2029];
char * tok;
char delim[]="`1234567890-=+_)(*&^%$#@!~<>?:\"{}|][;'/.,";
int lcuv, cuv;
ifstream fin("text.in");
ofstream fout("text.out");
fin.getline(linie,1028);
cuv=lcuv=0;
tok=strtok(str,delim);lcuv+=strlen(tok);
cuv++;
while(tok != NULL)
{
tok=strtok(NULL,delim);
lcuv+=strlen(tok);
cuv++;
}
fout<<lcuv/cuv;
fin.close();fout.close();
return 0;
}
