Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Unit1;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls;
- type
- TForm1 = class(TForm)
- fahrenhite: TLabel;
- Label2: TLabel;
- Edit1: TEdit;
- Edit2: TEdit;
- coversao: TButton;
- procedure coversaoClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- temperatura: real;
- fahrenhitee: real;
- celsius: real;
- implementation
- {$R *.dfm}
- procedure TForm1.coversaoClick(Sender: TObject);
- begin
- fahrenhitee:= strtofloat(edit1.Text);
- temperatura:= fahrenhitee -32;
- celsius:=temperatura/1.8;
- Edit2.Text:=floattostr(celsius);
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement