Cod sursa(job #1696928)
Utilizator | Data | 30 aprilie 2016 13:03:44 | |
---|---|---|---|
Problema | Text | Scor | 50 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
#include <cstdio>
using namespace std;
int lenght=0,space=1;
char ch;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c",&ch)!=EOF)
{
if(ch==' ')
space++;
if((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z'))
lenght++;
}
printf("%d",lenght/space);
return 0;
}