Cod sursa(job #211349)
| Utilizator | Data | 1 octombrie 2008 20:33:00 | |
|---|---|---|---|
| Problema | Text | Scor | 50 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.55 kb |
#include <iostream>
#include <stdio.h>
using namespace std;
int citire()
{
char buffer;
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 (n==32)
cuv++;
}
cuv++;
return lungime/cuv;
}
int main()
{
freopen ("text.out","w",stdout);
printf ("%d",citire());
fclose (stdout);
return 0;
}
