Pagini recente » Cod sursa (job #2582392) | Cod sursa (job #2265843) | Istoria paginii utilizator/echipa_de_vest | Cod sursa (job #1462392) | Cod sursa (job #556806)
Cod sursa(job #556806)
#include<stdio.h>
#include<string.h>
char text[1000000],nr=0,nr2=0;
bool isLet(char ch)
{
if((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z'))return true;
return false;
}
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
gets(text);
int ind=0;
bool wasC=false;
while(ind<strlen(text))
{
if(isLet(text[ind])==true)
{
if(wasC==false)nr++;
nr2++;
wasC=true;
}
else wasC=false;
ind++;
}
printf("%d\n",nr2/nr);
return 0;
}