Cod sursa(job #1068761)
Utilizator | Data | 28 decembrie 2013 18:39:08 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.42 kb |
#include<cstdio>
using namespace std;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
int l=0,cuv=0;
char c;
bool a=false;
while(scanf("%c",&c)!=EOF)
{
if((c>='a'&&c<='z')||(c>='A'&&c<='Z'))
{
l++;
}
if(c==' '||c=='-')
{
cuv++;
}
}
printf("%d",l/cuv);
return 0;
}