Cod sursa(job #831303)
Utilizator | Data | 8 decembrie 2012 13:54:24 | |
---|---|---|---|
Problema | Text | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.39 kb |
#include<fstream>
#include<cstring>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int main()
{
long long nr1,nr2;
char a,b;
while(fin.get(a)){
if(a>='a'&&a<='z'||a>='A'&&a<='Z')nr1++;
else if(b>='a'&&b<='z'||b>='A'&&b<='Z'){
nr2++;
b=a;}
}
fout<<nr1/nr2;
fin.close();
fout.close();
return 0;
}