Cod sursa(job #1913422)
Utilizator | Data | 8 martie 2017 12:50:25 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.47 kb |
#include <fstream>
#include <string>
using namespace std;
ifstream cin("text.in");
ofstream cout("text.out");
int n,i,j,x,l,sol,lg;
char c;
int main()
{
while(cin.get(c))
{
if((c>='a' && c<='z') || (c>='A' && c<='Z'))
{
++sol;
while((c>='a' && c<='z') || (c>='A' && c<='Z'))
cin.get(c), ++lg;
}
}
//cout<<lg<<" "<<sol<<"\n";
cout<<lg/sol;
return 0;
}