Cod sursa(job #2196662)
Utilizator | Data | 19 aprilie 2018 23:37:10 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.48 kb |
#include <iostream>
#include <string.h>
#include <cstring>
#include <fstream>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char c;
int i,nr,l,ok;
int main()
{
while(fin.get(c))
{
if(c>='a'&&c<='z'||c>='A'&&c<='Z')
{
l++;
ok=1;
}
else
{
if(ok==1)
{
nr++;
ok=0;
}
}
}
fout<<l/nr;
}