Pagini recente » Cod sursa (job #2415526) | Cod sursa (job #3203635) | Cod sursa (job #964027) | Cod sursa (job #2240795) | Cod sursa (job #1510681)
#include <fstream>
#include <string.h>
using namespace std;
ifstream fin ("text.in");
ofstream fout ("text.out");
char a[1000],mat[100][30],sep[]="-., :;?/'_<>()",*p;
int n=0,total=0;
int main()
{
fin.getline(a,1000);
p=strtok(a,sep);
while(p)
{
strcpy(mat[n],p);
for(int i=0;i<strlen(mat[n]);i++) total++;
n++;
p=strtok(NULL, sep);
}
fout<<(total-1)/n;
return 0;
}