Pagini recente » Cod sursa (job #1404998) | Cod sursa (job #126161) | Cod sursa (job #26073) | Cod sursa (job #1911473) | Cod sursa (job #1218737)
#include <fstream>
#include <cstring>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int text, litere=0, cuvinte=0;
bool cuv=false;
int main()
{
while(!f.eof()) {
text=f.get();
if ((text>=65 && text<=90) || (text>=97 && text<=122))
{ litere++;
cuv=true; }
else if (cuv==true)
{ cuvinte++;
cuv=false; } ; }
g<<litere/cuvinte;
return 0;
}