Pagini recente » Istoria paginii runda/alianta_001 | Cod sursa (job #2338484) | Cod sursa (job #3154408) | Cod sursa (job #2028795) | Cod sursa (job #1673470)
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream f("text.in");
char x;
int ok=1;
while(ok)
{
f>>x;
if(x>='A'&&x<='Z' || x>='a'&& x<='z')ok=0;
}
ok=1;
int nc=1;
while(f.get(x))
{
if(x>='A'&&x<='Z' || x>='a'&& x<='z')nc++;
if(x==' ' || x=='-')ok++;
}
ofstream g("text.out");
g<<(int)nc/ok;
g.close();
return 0;
}