Cod sursa(job #493712)

Utilizator NaSaCiocionica Ionut NaSa Data 19 octombrie 2010 09:13:34
Problema Text Scor 20
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.32 kb
#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[]{}";
	long long i,j=0,k=1;
	while(f.get(s,2559))
	for(i=0;i<=strlen(s)-1;i++)
		if(!strchr(d,s[i]))j++;
		else k++;
	g<<j/k;
		g.close();
		f.close();
}