Cod sursa(job #425584)
| Utilizator | Data | 25 martie 2010 21:24:39 | |
|---|---|---|---|
| Problema | Text | Scor | 30 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.5 kb |
#include<cstdio>
#include<cstring>
//int sep=" /-"
void cit(int &k, int &l)
{
char x;
k=0;l=0;
scanf("%c",&x);
while(x>=122 || (x<=97&&x>=90) || x<=65)
scanf("%c",&x);
while(!feof(stdin))
{
if( (97<=int(x)&&int(x)<=122) || (65<=int(x)&&int(x)<=90))
++l;
else
++k;
scanf("%c",&x);
}
}
void afis(int k, int l)
{
printf("%d",l/k);
}
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
int k,l;
cit(k,l);
afis(k,l);
}