Pagini recente » Cod sursa (job #2879331) | Cod sursa (job #1443774) | Cod sursa (job #2482413) | Cod sursa (job #1926420) | Cod sursa (job #573176)
Cod sursa(job #573176)
#include <iostream.h>;
#include <stdio.h>;
using namespace std;
char ch;
int a,b,c;
short k;
int main()
{
freopen("text.in","r",stdin);
while ( scanf("%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;
}