Pagini recente » Cod sursa (job #2942973) | Cod sursa (job #2846177) | Cod sursa (job #1321080) | Cod sursa (job #1313551) | 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;
}