Pagini recente » Cod sursa (job #3181490) | Cod sursa (job #1909624) | Cod sursa (job #3178879) | Cod sursa (job #144795) | 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;
}