Cod sursa(job #211377)
| Utilizator | Data | 1 octombrie 2008 21:20:38 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.63 kb |
#include <stdio.h>
#include <iostream>
using namespace std;
int citire()
{
char buffer;
bool k=false;
int n,cuv=0,lungime=0;
freopen("text.in","r",stdin);
while (!feof(stdin))
{
scanf("%c",&buffer);
n=(int)buffer;
if ((n>=65 && n<=90) || (n>=97 && n<=122))
{
lungime++;
if (!k) cuv++;
k=true;
}
else
k=false;
}
return lungime/cuv;
}
int main()
{
freopen ("text.out","w",stdout);
printf ("%d",citire());
fclose (stdout);
return 0;
}
