file_write(laquo;Заданияlaquo;+IntToStr(CSpinEdit1-gt;Value)+raquo;.zraquo;);
Memo1- gt; Lines- gt; Clear ();
Memo1- gt; Enabled=false;
Button1- gt; Enabled=false;
ShowMessage ( Варіант успішно змінено. );
Close ();
}
//---------------------------------------------------------------------------__fastcall TForm8 :: Button2Click (TObject * Sender)
{
Memo1- gt; Lines- gt; Clear ();
Memo1- gt; Enabled=false;
Button1- gt; Enabled=false;
Close ();
}
//---------------------------------------------------------------------------__fastcall TForm8 :: Button3Click (TObject * Sender)
{=CSpinEdit1-gt;Value;_read(laquo;Заданияlaquo;+IntToStr(variant)+raquo;.zraquo;);-gt;Text=Form9-gt;Memo1-gt;Text;-gt;Enabled =True; - gt; Enabled=true;
}
//---------------------------------------------------------------------------
Лістинг файлу Unit9.cpp
//---------------------------------------------------------------------------
# include lt; vcl.h gt;
# pragma hdrstop
# include Unit9.h
# define Form1 Form9
//---------------------------------------------------------------------------
# pragma package (smart_init)
# pragma resource *. dfm * Form9;
//---------------------------------------------------------------------------
__ fastcall TForm9 :: TForm9 (TComponent * Owner)
: TForm (Owner)
{
}
//---------------------------------------------------------------------------
coding ()
{
int k=Form1- gt; Memo1- gt; Lines- gt; Count;
for (int i=0; i lt; k; i ++) {
String s=Form1- gt; Memo1- gt; Lines- gt; Strings [i];
int k=s.Length ();
for (int i=1; i lt;=k; i ++)
s [i]=s [i] - (i * i + i)% 3-1;
Form1- gt; Memo1- gt; Lines- gt; Strings [i]=s;
}
}
//---------------------------------------------------------------------------decoding()
{
int k=Form1- gt; Memo1- gt; Lines- gt; Count;
for (int i=0; i lt; k; i ++) {
String s=Form1- gt; Memo1- gt; Lines- gt; Strings [i];
int k=s.Length ();
for (int i=1; i lt;=k; i ++)
s [i]=s [i] + (i * i + i)% 3 + 1;
Form1- gt; Memo1- gt; Lines- gt; Strings [i]=s;
}
}
//---------------------------------------------------------------------------file_read(String s)
{
Form1- gt; Memo1- gt; Lines- gt; LoadFromFile (s);
decoding ();
}
//---------------------------------------------------------------------------file_write(String s)
{
coding ();
Form1- gt; Memo1- gt; Lines- gt; SaveToFile (s);
}
//-----------------------------------------
Лістинг файлу Unit10.cpp
//---------------------------------------------------------------------------
# include lt; vcl.h gt;
# pragma hdrstop
# include Unit10.h
//---------------------------------------------------------------------------
# pragma package (smart_init)
# pragma resource *. dfm * Form10;
//---------------------------------------------------------------------------
__ fastcall TForm10 :: TForm10 (TComponent * Owner)
: TForm (Owner)
{
}
//-------------------------------------------------------------------------...