Cod sursa(job #1730731)
Utilizator | Data | 17 iulie 2016 15:49:53 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.46 kb |
#include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char s;
int main()
{
int k1,k=0;
k1=0;
while(!fin.eof())
{
fin.get(s);
if((s>=65&&s<=90)||(s>=97&&s<=122))
k++;
if(s==' '||s=='-'||s=='.'||s=='!'||s=='?'||s==':')
if(k!=0)
k1++;
}
fout<<k/(k1-1);
return 0;
}