Cod sursa(job #1465854)
| Utilizator | Data | 28 iulie 2015 09:09:59 | |
|---|---|---|---|
| Problema | Text | Scor | 70 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.47 kb |
#include <cstdio>
#include <cstring>
#include <ctype.h>
#include <iostream>
using namespace std;
char crt,ant;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
int i=0,k=0,k1=0;
scanf("%c",&crt);
while(!feof(stdin))
{
ant=crt;
scanf("%c",&crt);
if (isalpha(crt))
++k;
else if (isalpha(ant))
++k1;
}
printf("%d",k/k1);
return 0;
}
