Cod sursa(job #2181535)
Utilizator | Data | 21 martie 2018 18:44:09 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.38 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream in("text.in");\
ofstream out("text.out");
int main()
{
int l=0,
w=0;
string s;
getline(in,s);
for(int i=0;i<s.size();i++){
if(s[i] == ' ' || i==s.size()-1)
w++;
if((s[i] >= 65) || (s[i] >= 97 && s[i] <= 122))
l++;
}
out << l/w;
return 0;
}