Pagini recente » Cod sursa (job #2037818) | Cod sursa (job #1749068) | Istoria paginii monthly-2014/runda-3 | Monitorul de evaluare | Cod sursa (job #1288757)
//http://www.infoarena.ro/problema/text
#include <fstream>
#include <cstring>
#include <string>
using namespace std;
int main(){
char c;
int lung=0,ok,y=0,k=0;
ifstream f("text.in");
ofstream g("text.out");
while(!f.eof())
{
f.get(c);
if((c>='a'&&c<='z')||(c>='A'&&c<='Z'))
{
lung++;
if(k==0)
y++;
k=1;
}
else
k=0;
}
g<<(int)lung/y;
return 0;
}