Pagini recente » Cod sursa (job #3190571) | Cod sursa (job #46737) | Cod sursa (job #2973797) | Cod sursa (job #576873) | Cod sursa (job #573172)
Cod sursa(job #573172)
#include <iostream>;
#include <stdio>;
using namespace std;
char ch;
int a,b,c;
short k;
int main()
{
freopen("text.in","r",stdin);
while ( scanf(f,"%c",&ch) == 1 )
{
if ((( ch >= 'A') && ( ch <= 'Z' )) || (( ch >= 'a' ) && ( ch <= 'z' )))
{
k = 1;
a++;
}
else if ( k == 1 )
{
k = 0;
b++;
}
}
if ( k == 1 ) b++;
c = a/b;
freopen("text.out","w",stdout);
printf("%d", c);
fclose(stdout);
fclose(stdin);
return 0;
}