Pagini recente » Cod sursa (job #97603) | Cod sursa (job #2692751) | Cod sursa (job #795403) | Cod sursa (job #628715) | Cod sursa (job #2469021)
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int main()
{
int nrcuv = 1, nrlit = 0;
char chestie[99];
fin.getline(chestie, 99);
for (int i = 0; i <= strlen(chestie); i++)
{
if (chestie[i] == ' ' || chestie[i] == '-') nrcuv++;
if (chestie[i]>='a'&&chestie[i]<='z'||chestie[i]>='A'&&chestie[i]<='Z') nrlit++;
}
fout << nrlit/nrcuv;
return 0;
}