Cod sursa(job #2098145)
Utilizator | Data | 2 ianuarie 2018 14:31:32 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.45 kb |
#include <iostream>
#include <stdio.h>
#include <cstring>
using namespace std;
char c,ch;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
int cnt1=0,cnt2=0;
while(c!=EOF)
{
c=getchar();
if(isalpha(c))
{
cnt2++;
}
else if(isalpha(ch))
{
cnt1++;
}
ch=c;
}
cout<<cnt2/cnt1;
return 0;
}