Pagini recente » Cod sursa (job #2037887) | Cod sursa (job #424849) | Cod sursa (job #1108468) | Cod sursa (job #1490233) | Cod sursa (job #1367714)
#include<iostream>
#include<cstring>
#include<fstream>
using namespace std ;
ifstream fin ("text.in");
ofstream fout ("text.out");
int main()
{
char s[2251] ;
int cnt = 0 ;
char sep[] = " _ 1234567890,.?/!;\"'-@#$%^&*(){}[]|:<>+~`";
int cnnt = 0 ;
fin.getline(s,251);
char *p ;
p = strtok(s , sep);
while (p)
{
cnnt ++;
for (int i = 0 ; i <=strlen(p)-1;i++)
cnt ++ ;
p = strtok (NULL ,sep);
}
int plm = cnt / cnnt;
fout << plm;
return 0;
}