Cod sursa(job #1235023)
Utilizator | Data | 28 septembrie 2014 16:19:47 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.42 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 (fin.get(c))
{
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;
}