Cod sursa(job #31321)
Utilizator | Data | 15 martie 2007 20:23:44 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 kb |
#include<iostream.h>
#include<fstream.h>
#include<string.h>
main()
{
fstream f("text.in",ios::in);
fstream g("text.out",ios::out);
char x[1000],sep[]=" ,.!-_",*p,;
int n,i;
f>>x;
n=strlen(x);
p=strtok(x,sep);
i=0;
while (p!=0)
{p=strtok(NULL,sep);i++;}
n=n/i;
g<<n;}