Cod sursa(job #2690400)

Utilizator PopescuMihneaPopescu Mihnea-Valentin PopescuMihnea Data 23 decembrie 2020 21:31:11
Problema Text Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.36 kb
#include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
ifstream f ("text.in");
ofstream g ("text.out");
char x,aux;
int nrl,nrcuv;
int main()
{
    while(!f.eof())
    {   f.get(x);
        if (isalpha(x))
            nrl++;
        else if (nrl and isalpha(aux))
            nrcuv++;
        aux=x;
    }
    g<<nrl/nrcuv;
}