Cod sursa(job #1231932)
Utilizator | Data | 21 septembrie 2014 19:01:22 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.4 kb |
#include <cstdio>
#include <cstring>
using namespace std;
char x;
int s,k,t,q;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c",&x)!=EOF)
{
if((x<='z'&&x>='a')||(x<='Z'&&x>='A'))
{
k++;s=1;
}
else
if(s==1) {t++;s=0;}
}
q=k/t;
printf("%d ",k/t);
return 0;
}