Cod sursa(job #293737)
Utilizator | Data | 2 aprilie 2009 00:53:16 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | infoexpert | Marime | 0.48 kb |
/*
100p
*/
#include<stdio.h>
#include<fstream.h>
#include<string.h>
int len, cuv, k;
char c;
void citire()
{
int sol;
freopen("text.in","r",stdin);
scanf("%c",&c);
while (!feof(stdin))
{
if (c>='a' && c<='z' || c>='A'&& c<='Z')
{
len++;
if (k==0)
cuv++;
k=1;
}
else k=0;
scanf("%c",&c);
}
sol=len/cuv;
freopen("text.out","w",stdout);
printf("%d",sol);
}
int main()
{
citire();
return 0;
}