Cod sursa(job #2502318)
Utilizator | Data | 30 noiembrie 2019 17:48:45 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.33 kb |
#include <fstream>
#include <iostream>
using namespace std;
char a;
int i,nrl,nrc,s;
int main()
{
ifstream f ("text.in");
ofstream g ("text.out");
while (f.get(a))
{
if (a>='a' && a<='z' || a>='A' && a<='Z')
{nrl++;
s=1;
}
else if (s!=0) {nrc++;
s=0;
}
}
g<<nrl/nrc;
}