Pagini recente » Diferente pentru problema/jetoane2 intre reviziile 13 si 12 | Cod sursa (job #1566257) | Cod sursa (job #908639) | Diferente pentru problema/teams2 intre reviziile 12 si 13 | Cod sursa (job #2534194)
#include <iostream>
#include <cstring>
#include <fstream>
using namespace std;
ifstream fin ("text.in");
ofstream fout ("text.out");
int main ()
{
char ch;
int lung = 0;
int cuv = 0;
char lastCh = '\0';
while(fin >> noskipws >> ch)
{
if(isalpha(ch))
{
lung++;
if(!isalpha(lastCh))
cuv++;
}
lastCh = ch;
}
fout << lung / cuv;
}