Pagini recente » Cod sursa (job #2477245) | Cod sursa (job #1025501) | Cod sursa (job #3293705) | Cod sursa (job #1582474) | Cod sursa (job #1376146)
#include <cstdio>
#include <cctype>
using namespace std;
void solve()
{
int cuv = 0 , l = 0 ;
char c , ant ;
while ( scanf( "%c" , &c ) != -1 )
{
if ( isalpha(c) )
{
l ++ ;
if ( not isalpha(ant) )
cuv ++ ;
}
ant = c ;
}
printf( "%d\n" , l / cuv ) ;
}
int main()
{
freopen( "text.in" , "r" , stdin ) ;
freopen( "text.out" , "w" , stdout ) ;
solve() ;
return 0;
}