Cod sursa(job #2778877)
Utilizator | Data | 2 octombrie 2021 12:54:19 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
#include<fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int w,l,y;
char c;
int main()
{
while(f.get(c)) {
if(isalpha(c)) {
if(!y) {
y=1,++w;
}
++l;
} else
y=0;
}
g<<l/w;
return 0;
}