Cod sursa(job #1587874)
| Utilizator | Data | 2 februarie 2016 17:20:37 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.44 kb |
#include <fstream>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char a;
int lit,cuv;
bool OK;
int main()
{
while(!(fin.eof()))
{
fin.get(a);
if((a>='A' && a<='Z') || (a>='a' && a<='z'))
{
lit++;
OK=true;
}
else if(OK)
{
cuv++;
OK=false;
}
}
fout<<lit/cuv;
return 0;
}
