Pagini recente » Cod sursa (job #3134160) | Cod sursa (job #2654910) | Borderou de evaluare (job #1793485) | Cod sursa (job #2925587) | Cod sursa (job #1235023)
#include <iostream>
#include<fstream>
using namespace std;
ifstream fin ("text.in");
ofstream fout ("text.out");
char c, cant=0;
int lung=0, nrcuv=0;
int main()
{
while (fin.get(c))
{
if(c>='a' && c<='z') || (c>='A' && c<='Z')
lung++;
else
if(cant>='a' && cant<='z') ||(cant>='A' && cant <='Z')
nrcuv++;
cant = c;
}
fout<<lung/nrcuv;
return 0;
}