Cod sursa(job #2515009)
Utilizator | Data | 27 decembrie 2019 16:42:15 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.49 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=='}')
break;
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;
}