Cod sursa(job #273177)
| Utilizator | Data | 8 martie 2009 11:58:22 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.6 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(uc>='a' && uc<='z'|| uc>='A'&& uc<='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(c>='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;
}
