Cod sursa(job #2515011)
Utilizator | Data | 27 decembrie 2019 16:44:25 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.46 kb |
//#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream cin("text.in");
ofstream cout("text.out");
int nr=0,lung=0,ok=0;
char ch;
while(cin.get(ch)){
if((ch<='Z' and ch>='A' )or(ch<='z' and ch>='a')){
lung++;
ok=1;
}
else{
if(ok==1)
nr++;
ok=0;
}
}
//cout<<lung<<" "<<nr<<"\n";
cout<<lung/nr;
return 0;
}