Показать сообщение отдельно
  #1  
Старый 01.11.2009, 22:23
Аватар для Chuwis720
Chuwis720 Chuwis720 вне форума
Прохожий
 
Регистрация: 22.09.2009
Сообщения: 28
Репутация: 10
По умолчанию В чем проблема?

Код:
unit Equation;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;
var a,b,c:string;
type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Edit2: TEdit;
    Label3: TLabel;
    Edit3: TEdit;
    Button1: TButton;
    Button2: TButton;
    Label4: TLabel;
    Label5: TLabel;
    Edit4: TEdit;
    Edit5: TEdit;
    Memo1: TMemo;
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);

begin
a:=Edit1.text;
b:=Edit2.text;
c:=Edit3.text;
end;

procedure TForm1.Button2Click(Sender: TObject);
var x1,x2:longint;

begin
strtoint(a); strtoint(b); strtoint(c);
x1:=((-b+(sqrt(b*b-4*a*c)))/2a);
x1:=((-b-(sqrt(b*b-4*a*c)))/2a);
end;

end.

Кто нибудь может сказать, где ошибка? Скриншот:http://s11.radikal.ru/i183/0911/d7/ea7b19a74450.gif

ЗЫ: Я новичек, так что ногами не бейте, если что))
Ответить с цитированием