Pagini recente » Cod sursa (job #1845517) | Cod sursa (job #1915816) | Diferente pentru problema/maraton intre reviziile 3 si 4 | Cod sursa (job #2516759) | Cod sursa (job #1529317)
#include <iostream>
#include <fstream>
using namespace std;
bool k=false;
string s;
int x,i,n,q;
int main()
{
ifstream f("text.in");
ofstream g("text.out");
getline(f,s);
n=s.size();
for(i=0;i<=n;i++)
{
if((s[i]>='A' and s[i]<='Z') or (s[i]>='a' and s[i]<='z'))
{
x++;
k=false;
}
else
if(k==false)
{
q++;
k=true;
}
}
g<<x/q;
return 0;
}