Pagini recente » Cod sursa (job #2220243) | Cod sursa (job #1454933) | Cod sursa (job #291304) | Cod sursa (job #1415885) | Cod sursa (job #1554342)
#include <cstdio>
#include <cstring>
#include <cctype>
using namespace std;
char s[256] , *p , sep[20] = " ,-?!@#$^%&*(+=)_";
int n , c;
int main()
{
freopen ("text.in" , "r" , stdin);
freopen ("text.out" , "w" , stdout);
gets (s);
for (int i = 0 ; i < strlen (s) ; ++i)
(isalpha(s[i])) ? c++ : c;
p = strtok (s , sep);
while (p)
{
n++;
p = strtok (NULL , sep);
}
printf ("%d" , c / n);
return 0;
}