Pagini recente » Cod sursa (job #276891) | Cod sursa (job #1172895) | Istoria paginii runda/meow1/clasament | Cod sursa (job #2077530) | Cod sursa (job #1288754)
//http://www.infoarena.ro/problema/text
#include<fstream>
#include<iostream>
#include<stdio.h>
using namespace std;
int dim, cuv, k;
char c;
void citire()
{
int sol;
ifstream f("text.in");
ofstream g("text.out");
f>>c;
while (!f.eof())
{
if (c>='a' && c<='z' || c>='A'&& c<='Z')
{
dim++;
if (k==0)
cuv++;
k=1;
}
else k=0;
f>>c;
}
sol=dim/cuv;
g<<sol;
}
int main()
{
citire();
return 0;
}