Pagini recente » Cod sursa (job #2880249) | Statistici Iordache Matei (mateidasi) | Borderou de evaluare (job #1200605) | Cod sursa (job #2494969) | Cod sursa (job #1292853)
#include <iostream>
#include <math.h>
#include <fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int main()
{
char s;
int cuv = 1, ltot = 0;
while (cin.get(s))
{
if (s == ' ')
{
cuv = cuv + 1;
}
else
{
if ((s >= 'a' && s <= 'z') | (s >= 'A' && s <= 'Z'))
{
ltot = ltot + 1;
}
}
}
g<<ltot / cuv;
return 0;
}