Cod sursa(job #2786286)
Utilizator | Data | 20 octombrie 2021 17:31:06 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.3 kb |
#include<fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int w,l;
bool 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;
}