Cod sursa(job #1740572)
Utilizator | Data | 11 august 2016 19:36:48 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
#include <fstream>
using namespace std;
ifstream fi("text.in");
ofstream fo("text.out");
char x;
int cuv,total,ok;
int main()
{
while (fi.get(x))
{if (('a'<=x and x<='z') or ('A'<=x and x<='Z')) {total++;ok=1;}
else {if(ok==1)cuv++;ok=0;}
}
fo<<total/cuv;
return 0;
}