Răspuns:
asta e
Explicație:
#include <iostream>
#include <iomanip>
#include <cstring>
using namespace std;
int main()
{
char s[101];
char lista[101][101];
int poz = 0;
cin.getline(s,100);
char *word;
word = strtok(s,".,;:'?!- ");
while(word != NULL)
{
strcpy(lista[poz++],word);
word = strtok(NULL,".,;:'?!- ");
}
double nr_cuvinte = poz;
double suma = 0;
for (int i = 0; i < poz; i++)
suma += strlen(lista[i]);
cout << fixed << setprecision(2) << suma / nr_cuvinte;
}