Pagini recente » Diferente pentru problema/zigzag2 intre reviziile 6 si 31 | Cod sursa (job #856899) | Cod sursa (job #336903) | Cod sursa (job #417898) | Cod sursa (job #1016902)
#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", "w", 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;
}