Pagini recente » Borderou de evaluare (job #3106237) | Borderou de evaluare (job #1495391) | Borderou de evaluare (job #3237365) | Statistici Andrei Bodea (RiseAgainst03) | Cod sursa (job #1249486)
#include <fstream>
using namespace std;
ifstream fin ("text.in");
ofstream fout("text.out");
int lung=0,cuv=0,aux=0;
char text;
int main()
{
while(fin.get(text))
{
if((text<=122 && text>=97)||(text<=90 && text>=65)) // 97=a 65=A 90=Z 122=z
{
lung++;
aux=1;
}
else
if(aux!=0)
{
cuv++;
aux=0;
}
}
fout<<lung/cuv;
return 0;
}