Pagini recente » Cod sursa (job #637231) | Cod sursa (job #14524) | Cod sursa (job #1337791) | Cod sursa (job #1239641) | Cod sursa (job #1187132)
#include<cstdio>
#include<string.h>
#include<fstream>
using namespace std;
char s[100000000];
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,100000000);
p=strtok(s," ~!@#$%^&*()_+{}|<->?/.,';\][=-0987654321`");
while(p!=NULL)
{
lungime=lungime+strlen(p);
numar=numar+1;
p=strtok(NULL," ~!@#$%^&*()_+{}|<>?/.,-';\][=-0987654321`");
}
g<<lungime/numar;
}