Cod sursa(job #275025)

Utilizator brainwashed20Alexandru Gherghe brainwashed20 Data 10 martie 2009 10:17:05
Problema Text Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.37 kb
#include<stdio.h>
#include<conio.h>

int verif(char c)
{
 if(c>=65 && c<=90) return 1;
 if(c>=97 && c<=122) return 1;
 return 0;
}

int main()
{
 clrscr();
 char c;
 int k2=0,k=0;
 freopen("text.in","r",stdin);
 //freopen("text.out","w",stdout);
 while(scanf("%c",&c)!=EOF)
 {
  if(c==' ') k++;
  k2+=verif(c);
 }
 printf("%d",k2/(++k));
 return 0;
}