Cod sursa(job #2437921)
Utilizator | Data | 10 iulie 2019 18:55:30 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.49 kb |
// Example program
#include <iostream>
#include <string.h>
#include <fstream>
using namespace std;
ifstream f("text.in");
ofstream o("text.out");
int avg,len,wordc;
char k,p;
bool wrd;
int main()
{word=false;
while(f.get(c))
{
if((c>='a' && c<='z') || (c>='A'&& c<='Z'))
{
k++;
word=true;
}
else
if(word)
{
word=false;
p++;
}
}
o<<k/p;
return 0;
}