Pagini recente » clasament-teme | Cod sursa (job #1715625) | Cod sursa (job #2030806) | Cod sursa (job #2449271) | Cod sursa (job #770720)
Cod sursa(job #770720)
#include<iostream>
#include<fstream>
#include<string.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
char ch;
int main()
{
int i,n,litere=0,cuv=0,ok=1;
while(!f.eof())
{
f.get(ch);
if((int)ch>=65&&(int)ch<=90||(int)ch>=97&&(int)ch<=122)
{
if(ok==1)
{
cuv++;
ok=0;
}
litere++;
}
else
ok=1;
}
g<<litere/cuv;
return 0;
}