Cod sursa(job #602481)
Utilizator | Data | 11 iulie 2011 16:28:28 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.3 kb |
#include <cstdio>
int main()
{ char a,b;int x=0,y=0;
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
a=getchar();b='0';
while(b!=EOF){b=getchar();
if((a>64&&a<91)||(a>96&&a<123))
{x++;if(b<65||b>122||(b>90&&b<97))y++;};a=b;}
printf("%d",x/y);
}