Pagini recente » Cod sursa (job #2064603) | Cod sursa (job #1840082) | Cod sursa (job #45476) | Cod sursa (job #3199278) | Cod sursa (job #1577600)
#include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
int main()
{
ifstream f ("text.in");
ofstream g ("text.out");
char s[10000],sep[]=" -+&%$#@)(?!;:'*~`|][}{=><,.",*p,l[]="qwertyuioplkjhgfdsazxcvbnmQWERTYUIOPLKJHGFDSAZXCVBNM";
f.getline(s,10000);
int i,k=0,m=0,z;
for (i=0;i<strlen(s);i++)
{
if (strchr(l,s[i]));
m++;
}
p=strtok(s,sep);
while (p)
{
k++;
p=strtok(NULL,sep);
}
z=m/k;
g<<z;
g.close();
}