Cod sursa(job #6511)

Utilizator mariusdrgdragus marius mariusdrg Data 19 ianuarie 2007 21:57:07
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.66 kb
#include<stdio.h>
#include<string.h>


int le;
int nr;


int main()
{
        freopen("text.in","r",stdin);
        freopen("text.out","w",stdout);
        int ver=0;
        int c1=0;
        char c;
        while(!feof(stdin))
        {
                scanf("%c",&c);
      
                if (!(('a'<=c&&c<='z')||('A'<=c&&c<='Z')))
                {

                        if (ver)nr++;
                        ver=0;
                }
                else
                {
                        ver=1;
                        le++;
                }
        }
        if (ver)nr++;
        printf("%d",le/nr);
        return 0;
}