Cod sursa(job #1773734)
Utilizator | Data | 8 octombrie 2016 10:12:32 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
#include<fstream>
using namespace std;
char x,n,pr;
int lit,cuv;
int main()
{
ifstream f("text.in");
ofstream g("text.out");
while(f.get(x))
{
if ((x>='a'&&x<='z')||(x>='A'&&x<='Z'))lit++;
else
if ((pr>='a'&&pr<='z')||(pr>='A'&&pr<='Z'))cuv++;
pr = x;
}
g<<lit/cuv;
}