Pagini recente » Cod sursa (job #2962539) | Cod sursa (job #1825702) | Cod sursa (job #633676) | Cod sursa (job #2184387) | Cod sursa (job #1522365)
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
char x ;
int i , n , k , K , ok;
bool bun(char x)
{
if((x >= 65 && x <= 90) || (x >=97 && x <= 122))
return true;
return false;
}
int main()
{
ifstream f ("text.in");
ofstream g ("text.out");
x = f.get();
while(!f.eof())
{
if(bun(x))
{
K++;
ok = 1;
}
else
if(ok == 1)
{
k++;
ok = 0;
}
x = f.get();
}
g << K / k;
return 0;
}