брати Властивості -> Додатково -> Використання пам'яті -> або
Віртуальна пам'ять.
В
Додаток 1
Текст основної програми на мові Borland Delphi 7.0 для Windows
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Math;
type
TForm1 = class (TForm)
Label1: TLabel;
Button1: TButton;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
procedure Button1Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations}
end;
7
var
Form1: TForm1; Label1: TLabel;
A: extended; B: extended; C: extended;
i: integer; a1, B1, C1: extended;
implementation
procedure TForm1.Button1Click (Sender: TObject);
label start;
begin
{$ R *. dfm}
// Введення сторін трикутника
i: = 0;
start:
A: = StrToFloat (InputBox ('Введіть А', 'Введіть А', '0 '));
B: = StrToFloat (InputBox ('Введіть B', 'Введіть B', '0 '));
C: = StrToFloat (InputBox ('Введіть C', 'Введіть C', '0 '));
Button1.Visible: = false;
Label1.Visible: = true;
Label2.Visible: = true;
Label3.Visible: = true;
Label1.Caption: = ('A =') + FloatToStr (a);
Label2.Caption: = ('B =') + FloatToStr (b);
Label3.Caption: = ('C =') + FloatToStr (c);
Label7.Visible: = true;
В
Label7.Caption: = 'Сторони трикутника:';
if (a + b
ShowMessage ('Невірний введення, введіть число> 0 ');
i: = i +1;
if (i> 2) then
exit;
goto start;
end ;//end;
Label8.Visible: = true; Label8.Caption: = 'Кути трикутника: ';
Label4.Visible: = true;
Label5.Visible: = true;
Label6.Visible: = true;
A1: = ((arccos ((b * b + c * ca * a)/(2 * b * c))) * 180)/Pi;
B1: = ((arccos ((A * A + c * cB * B)/(2 * A * c))) * 180)/Pi;
C1: = ((arccos ((b * b + A * AC * C)/(2 * b * A))) * 180)/Pi;// Обчислення кутів
Label4.Caption: = FloatToStr (a1);
Label5.Caption: = FloatToStr (B1);
Label6.Caption: = FloatToStr (C1);
// Визначення трикутника за його кутку
if (a1 = 90) or (b1 = 90) or (c1 = 90) then begin
Label9.Visible: = true; Label9.Caption: = 'Трикутник прямокутний';
end;