Cod sursa(job #493704)
| Utilizator | Data | 19 octombrie 2010 08:13:39 | |
|---|---|---|---|
| Problema | Text | Scor | 20 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.36 kb |
#include<iostream.h>
#include<fstream.h>
#include<string.h>
ifstream f("text.in");
ofstream g("text.out");
int main()
{
char s[256],d[100]=" ,.?<>:;!~`@#$%^&*()1234567890",e[2]=" ";
long long i,j=0,k=0;
f.get(s,255);
for(i=0;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();
}
