Pagini recente » Cod sursa (job #862155) | Cod sursa (job #2084809) | Cod sursa (job #2982842) | Cod sursa (job #270678) | Cod sursa (job #1187131)
#include<cstdio>
#include<string.h>
#include<fstream>
using namespace std;
char s[10000000];
int main()
{
/*FILE *f=fopen("text.in","r");
FILE *g=fopen("text.out","w");*/
fstream f,g;
f.open("text.in",ios::in);
g.open("text.out",ios::out);
char *p;
int lungime=0,numar=0;
f.getline(s,10000000);
p=strtok(s," ~!@#$%^&*()_+{}|<->?/.,';\][=-0987654321`");
while(p!=NULL)
{
lungime=lungime+strlen(p);
numar=numar+1;
p=strtok(NULL," ~!@#$%^&*()_+{}|<>?/.,-';\][=-0987654321`");
}
g<<lungime/numar;
}