Mai intai trebuie sa te autentifici.
Cod sursa(job #737540)
| Utilizator | Data | 19 aprilie 2012 16:59:46 | |
|---|---|---|---|
| Problema | Text | Scor | 30 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.67 kb |
#include <cstdio>
#include <cstdlib>
using namespace std;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
int k,length=0,cuv=0;
char c;
while(c!='\n')
{
scanf("%c", &c);
if(c=='\n') break;
if((c>='a' && c<='z') || (c>='A' && c<='Z'))
{
length++;
if(k==0) cuv++;
k=1;
}else
{
k=0;
}
}
printf("%i\n", length/cuv);
int i;
scanf("%i", &i);
return 0;
}
