Cod sursa(job #663006)
Utilizator | Data | 17 ianuarie 2012 18:00:09 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
#include<cstdio>
using namespace std;
int lit,nrcuv;
bool ok;
char x;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c",&x)!=EOF)
if((x>='a'&&x<='z')||(x>='A'&&x<='Z')){
lit++;
if(!ok)
nrcuv++;
ok=1;
}
else
ok=0;
printf("%d",lit/nrcuv);
return 0;
}