Pagini recente » Cod sursa (job #1981715) | Cod sursa (job #2183417) | Diferente pentru problema/drumuri3 intre reviziile 13 si 12 | Diferente pentru problema/teams2 intre reviziile 17 si 6 | Cod sursa (job #2657436)
#include <iostream>
#include <fstream>
using namespace std;
int o,n,c;
char a;
int main()
{
ifstream f ("text.in");
ofstream g ("text.out");
while (f.get(a))
{
if ('A'<=a && a<='Z')
{
n++;
o=1;
}
else if ('a'<=a && a<='z')
{
n++;
o=1;
}
else
{
if (o==1) {c++;o=0;}
}
}
if (o==1)
{
c++;
o=0;
}
g<<n/c;
}