Cod sursa(job #2266728)
Utilizator | Data | 22 octombrie 2018 21:02:36 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.47 kb |
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
char x,y;
int lit=0,cuv=0;
x=getchar();
while(x!=EOF)
{
y=x;
x=getchar();
if((y>='a'&&y<='z')||(y>='A'&&y<='Z'))
{
lit++;
if(x!=EOF&&((x<'a'||x>'z')&&(x<'A'||x>'Z')))
cuv++;
}
}
cout<<lit/cuv;
return 0;
}