Mai intai trebuie sa te autentifici.
Cod sursa(job #1097175)
Utilizator | Data | 3 februarie 2014 09:53:15 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.54 kb |
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
long i,nrl,bun,ok,nrc;
char c;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
nrc=0;
nrl=0;
ok=0;
while(!feof(stdin))
{
scanf("%c",&c);
if((c>='A'&&c<='Z')||(c>='a'&&c<='z'))
{
nrl++;
if(ok==0)
{
nrc++;
ok=1;
}
}
else ok=0;
}
printf("%ld",nrl/nrc);
return 0;
}