Cod sursa(job #1562144)
Utilizator | Data | 4 ianuarie 2016 20:37:58 | |
---|---|---|---|
Problema | Text | Scor | 100 |
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");
int cuv , lit , contor;
char a;
int main()
{
while(fin.get(a))
{
if((a>='A' && a<='Z' ) || (a>='a' && a<='z'))
{
lit++;
contor = true;
}
else
if(contor)
{
contor = false;
cuv++;
}
}
if(contor) cuv++;
fout<<lit/cuv;
}