Cod sursa(job #1536960)
Utilizator | Data | 26 noiembrie 2015 20:00:17 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.45 kb |
#include <iostream>
#include <fstream>
using namespace std;
long long k,i,m,x,j,ct,ct1,ok;
char c;
int main()
{
ifstream fin("text.in");
ofstream fout("text.out");
for(ct=0,ct1=0;fin.get(c);)
{
if(isalpha(c))
{
ct1++;
ok=1;
}
else
{
if(ok==1)
ct++;
ok=0;
}
}
fout<<ct1/ct<<endl;
return 0;
}