Cod sursa(job #1246441)
Utilizator | Data | 21 octombrie 2014 08:47:08 | |
---|---|---|---|
Problema | Text | Scor | 30 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.48 kb |
#include<fstream>
#include<cstring>
using namespace std;
int main()
{
char c[1000];
int e=0,l=0,cuv=0;
ifstream fin("text.in");
ofstream fout("text.out");
fin.get(c,1000);
for(int a=1;a<strlen(c);a++)
{
if((c[a]>='a' and c[a]<='z') or (c[a]>='A' and c[a]<='Z'))
{
l++;
if(e==0)
{
e=1;
cuv++;
}
}
else e=0;
}
fout<<l/cuv;
}