Cod sursa(job #1293418)
Utilizator | Data | 15 decembrie 2014 21:31:22 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.37 kb |
#include<iostream>
#include<fstream>
#include<string>
using namespace std;
int main()
{
ifstream f("text.in");
ofstream f1("text.out");
string sir;
unsigned long long nr_cuvinte=0;
char c;
while(!f.eof())
{
f>>c;
sir.push_back(c);
if (c==' ') nr_cuvinte++;
}
f1<<sir.size()/nr_cuvinte;
return 0;
}