Cod sursa(job #474366)
| Utilizator | Data | 3 august 2010 15:09:20 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.38 kb |
#include<fstream>
#include<string>
using namespace std;
int main()
{char a[30000],b[30000],*p,s[]="!#$%&'()*+,-./0123456789:";<=>?@[]^_`{|}~ ",*p1;long long k=0,x=0,y;
ifstream f("text.in");ofstream g("text.out");
f.getline(a,100);
p=strtok(a,s);
while(p)
{
k++;
strcat(b,p);
p=strtok(NULL,s);
}
x=strlen(b);
y=x/k;
g<<y;
f.close();g.close();
return 0;}
