Pagini recente » Cod sursa (job #1499452) | Cod sursa (job #2998902) | Cod sursa (job #320298) | Cod sursa (job #1126133) | Cod sursa (job #493711)
Cod sursa(job #493711)
#include<iostream.h>
#include<fstream.h>
#include<string.h>
ifstream f("text.in");
ofstream g("text.out");
int main()
{
char s[2560],d[100]=" ,.?<>:;!~`@#$%^&*()1234567890[]{}",e[3]=" -";
long long i,j=0,k=1;
while(f.get(s,2559))
{for(i=1;i<=strlen(s)-1;i++)
if(strchr(e,s[i])) k++;
for(i=0;i<=strlen(s)-1;i++)
if(!strchr(d,s[i]))j++;}
g<<j/k;
g.close();
f.close();
}