Cod sursa(job #1715932)
Utilizator | Data | 11 iunie 2016 17:42:07 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
#include<fstream>
#include<cstring>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
char c;
int nrl, nrcuv, ok;
int main()
{
while(f.get(c))
{
if((c>='a' and c<='z') or (c>='A' and c<='Z'))
nrl++, ok=1;
else if(ok) ok=0, nrcuv++;
}
g<<nrl/nrcuv;
}