Pagini recente » Cod sursa (job #1333955) | Cod sursa (job #2445516) | Cod sursa (job #2465858) | Cod sursa (job #1205903) | Cod sursa (job #1367705)
#include<iostream>
#include<cstring>
#include<fstream>
using namespace std ;
ifstream fin ("text.in");
ofstream fout ("text.out");
int main()
{
char s[251] ;
int cnt = 0 ;
char sep[] = " ,-;";
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);
}
double plm = cnt / cnnt;
fout << (int) plm;
return 0;
}