Cod sursa(job #1749611)
Utilizator | Data | 28 august 2016 14:51:24 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.45 kb |
#include<fstream>
#include<string.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int main()
{
char c;
int NrLit=0,NrCuv=0,ok=0;
while(!(f.eof()))
{
f.get(c);
if((c>='A'&&c<='Z')||(c>='a'&&c<='z'))
{
NrLit++;
ok=1;
}
else
{
if(ok==1)
NrCuv++;
ok=0;
}
}
g<<NrLit/NrCuv;
}