Cod sursa(job #987699)

Utilizator Alexa2001Alexa Tudose Alexa2001 Data 21 august 2013 13:02:12
Problema Text Scor 100
Compilator cpp Status done
Runda clasele_5_6 Marime 0.32 kb
#include <fstream>

using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int nrlit,nrcuv;
char c;
bool ok;
int main()
{
   ok=false;
   while(f.get(c))
    if(isalpha(c)==0 && ok==true) {++nrcuv;ok=false;}
         else if(isalpha(c)) {++nrlit;ok=1;}
     g<<nrlit/nrcuv;






    return 0;
}