Pagini recente » Cod sursa (job #345276) | Cod sursa (job #3284369) | Cod sursa (job #588496) | Cod sursa (job #2452708) | Cod sursa (job #919585)
Cod sursa(job #919585)
#include <fstream>
#include <cstring>
using namespace std;
ifstream in ("text.in");
ofstream out ("text.out");
char s[]="qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM",c;
int main()
{
int l=0,now=0,w=0,i=0;
while(in.get(c))
{
i++;
char *p;
p=strchr(s,c);
if(p)
{
if(now==0)
{
now=1;
w++;
}
l++;
}
else
now=0;
}
out<<l/w;
return 0;
}