Cod sursa(job #1687159)

Utilizator DaniellDa Vinci Daniell Data 12 aprilie 2016 18:23:11
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.23 kb
#include <fstream>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int c,l,p;
char x;
int main()
{
while(fin.get(x))
{
if(isalpha(x)){l++;p=1;}
else if(p){p=0;c++;}
}
fout<<l/c;
return 0;
}