Cod sursa(job #1331528)
| Utilizator | Data | 31 ianuarie 2015 19:22:46 | |
|---|---|---|---|
| Problema | Text | Scor | 40 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.53 kb |
#include <iostream>
#include<cstdio>
#include<string.h>
using namespace std;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
int n,i,l=0,cuv=0;
char c,cs;
scanf("%c%c",&cs,&c);
while(cs!=NULL&&cs!='\n')
{
if((cs>='a'&&cs<='z')||(cs>='A'&&cs<='Z'))
l++;
if(((c<'a'||c>'z')&&(c<'A'||c>'Z'))&&((cs>='a'&&cs<='z')||(cs>='A'&&cs<='Z')))
cuv++;
cs=c;
scanf("%c",&c);
}
printf("%d", l/cuv);
return 0;
}
