Pagini recente » Cod sursa (job #945062) | Cod sursa (job #1010904) | Cod sursa (job #426065) | Cod sursa (job #634108) | Cod sursa (job #1295515)
#include <iostream>
#include <string.h>
#include <fstream>
using namespace std;
int main()
{ char a[300000],b[100]="qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
ifstream f("text.in");
ofstream g("text.out");long int k=0,l=0;int ok=0;int i=0;
f.getline(a,300000);
while(a[i]!=NULL)
{
if(strchr(b,a[i]))
{
k++;
if(ok==0)
{
l++;ok=1;
}
}
else
ok=0;i++;
}
k=k/l;
g<<k;
return 0;
}