Pagini recente » Cod sursa (job #2624216) | Cod sursa (job #2942713) | Cod sursa (job #516398) | Cod sursa (job #1013700) | Cod sursa (job #1218735)
#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(); g<< text << "\n";
if ((text>=65 && text<=90) || (text>=97 && text<=122))
{ litere++;
cuv=true; }
else if (cuv==true)
{ cuvinte++;
cuv=false; } ; }
g<<litere/cuvinte;
return 0;
}