Cod sursa(job #273168)

Utilizator uaraRoventa Robert uara Data 8 martie 2009 11:46:28
Problema Text Scor 80
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.57 kb
#include<stdio.h>

char c,uc;
int a,s,sf,i,ok,l,n,k;

int main()
{
    freopen("text.in","r",stdin);
    freopen("text.out","w",stdout);
    scanf("%c",& uc);
      if(c>='a' && c<='z'|| c>='A'&& c<='Z') k=1;
				  else k=0;
    
    do{  uc=c;
       scanf("%c",&c);
      if(uc>='a' &&uc<='z'||uc>='A'&& uc<='Z') {
						k++;
		   if(!(c>='a' &&c<='z'||c>='A'&& c<='Z')) a++;
						}
        if(uc>='a' && c<='z'|| c>='A'&& c<='Z');

      }while(!feof(stdin));
      if(uc>='a' &&uc<='z'||uc>='A'&& uc<='Z') a++;

      printf("%d",k/a);
      return 0;
}