Cod sursa(job #1235025)
Utilizator | Data | 28 septembrie 2014 16:25:19 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.44 kb |
#include <iostream>
#include<fstream>
using namespace std;
ifstream fin ("text.in");
ofstream fout ("text.out");
char c, cant=0;
int lung=0, nrcuv=0;
int main()
{
while(c!=EOF)
{
c=fin.get();
if(c>='a' && c<='z') || (c>='A' && c<='Z')
lung++;
else
if(cant>='a' && cant<='z') ||(cant>='A' && cant <='Z')
nrcuv++;
cant = c;
}
fout<<lung/nrcuv;
return 0;
}