Cod sursa(job #2068920)
Utilizator | Data | 18 noiembrie 2017 11:37:11 | |
---|---|---|---|
Problema | Text | Scor | 70 |
Compilator | cpp | Status | done |
Runda | evaluare_cex_sv_cls_x | Marime | 0.34 kb |
#include <fstream>
#include <string>
using namespace std;
ifstream f ("text.in");
ofstream g ("text.out");
int main()
{
int k=0, p=0, i;
string c;
while(f>>c)
{
for(i=0; i<c.size(); i++)
{
if(isalpha(c[i]))
k++;
}
p++;
}
g<<k/p;
return 0;
}