Cod sursa(job #1032858)
| Utilizator | Data | 16 noiembrie 2013 10:08:59 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.43 kb |
#include <iostream>
#include <fstream>
#include<string.h>
#include<stdio.h>
using namespace std;
int n,nr;
int main()
{ifstream f("text.in");char *p;p=new char;
ofstream g("text.out");
char *text,*spatii=" , . ! - ? ";text=new char;
f.get(text,1000);
cout<<text<<endl;
n=strlen(text);//cout<<n;
p=strtok(text,spatii);
nr++;
while(p!=NULL){nr++;p=strtok(NULL,spatii);
}
cout<<(n-nr)/nr<<endl;
cout<<nr;
return 0;
}
