Cod sursa(job #2086834)
Utilizator | Data | 12 decembrie 2017 16:13:10 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.44 kb |
#include <fstream>
#include <cstring>
using namespace std;
ifstream in("text.in");
ofstream out("text.out");
int c = 0, l = 0;
char x;
bool cuv_nou = false;
int main()
{
while(in.get(x))
{
if((x>='a' && x<='z') || (x>='A' && x<='Z'))
{
l++;
if(!cuv_nou)
cuv_nou = true, c++;
}
else cuv_nou = false;
}
out << l/c << "\n";
return 0;
}