Cod sursa(job #2419049)
Utilizator | Data | 7 mai 2019 16:49:30 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.47 kb |
#include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
char s[1000001],*p,sep[]=" ,-,.,!,?";
int n,k;
void Citire()
{
f.get(s,100001);
f.get();
p=strtok(s,sep);
while(p)
{
n+=strlen(p);
k++;
p=strtok(0,sep);
}
//g<<s;
g<<n/k;
}
int main()
{Citire();
cout << "Hello world!" << endl;
return 0;
}