Pagini recente » Cod sursa (job #728715) | Cod sursa (job #2472455) | Cod sursa (job #2436000) | Cod sursa (job #32917) | Cod sursa (job #823347)
Cod sursa(job #823347)
#include <fstream>
#include <cstring>
using namespace std;
const char iname[] = "text.in";
const char oname[] = "text.out";
ifstream fin(iname);
ofstream fout(oname);
char a , b;
int x , y;
void VeritaSerum ()
{
while ( fin.get( a ) )
{
if( a >= 'a' && a <= 'z' || a >= 'A' && a <= 'Z' )
++x;
else
if( b >= 'a' && b <= 'z' || b >= 'A' && b <= 'Z' )
++y;
b = a;
}
}
int main()
{
VeritaSerum ();
fout << x / y << '\n';
return 0;
}