Cod sursa(job #1708025)
Utilizator | Data | 26 mai 2016 13:07:21 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.53 kb |
#include <fstream>
using namespace std;
int nc,ncuv;
ofstream g("text.out");
void citire()
{
ifstream f("text.in");
char c;
int ok=0;
while(f.get(c))
{
//g<<c;
if((c>='a'&&c<='z')||(c>='A'&&c<='Z'))
{
ok=1;
nc++;
}
else
{
if(ok==1)
{
ok=0;
ncuv++;
}
}
}
f.close();
}
int main()
{
citire();
g<<nc/ncuv;
return 0;
}