Cod sursa(job #1899078)
Utilizator | Data | 2 martie 2017 15:17:18 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.47 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int main()
{
char c;
int i=0,d=0;
unsigned long long l=0,nc=0;
while(fin.get(c)){
if((c-'a'>=0&&c-'a'<=25)||(c-'A'>=0&&c-'A'<=25)){
l++;
d=1;
}
else{
if(d==1){
nc++;
}
d=0;
}
}
fout<<l/nc;
return 0;
}