Cod sursa(job #1016900)
| Utilizator | Data | 26 octombrie 2013 21:30:23 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.45 kb |
#include <cstdio>
#include <cstdlib>
#include <cstring>
long long int o, s;
int i;
bool irasjel = true;
char c;
int main()
{
FILE *f = freopen("text.in", "r", stdin);
freopen("text.out", "r", stdout);
while (!feof(f))
{
scanf("%c", &c);
if ((c>='a' && c<='z')||(c>='A' && c<='Z'))
{
++o;
if (irasjel)
{
++s;
irasjel = false;
}
}
else irasjel = true;
}
printf("%d", o/s);
return 0;
}