daily pastebin goal
68%
SHARE
TWEET

Untitled

a guest Oct 23rd, 2018 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. unit Unit1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
  9.  
  10. type
  11.  
  12.   { TForm1 }
  13.  
  14.   TForm1 = class(TForm)
  15.     Button1: TButton;
  16.     Edit1: TEdit;
  17.     Edit2: TEdit;
  18.     Edit3: TEdit;
  19.     Edit4: TEdit;
  20.     Label1: TLabel;
  21.     Label2: TLabel;
  22.     Label3: TLabel;
  23.     Label4: TLabel;
  24.     procedure klikrezultat(Sender: TObject);
  25.   private
  26.  
  27.   public
  28.  
  29.   end;
  30.  
  31. var
  32.   Form1: TForm1;
  33.  
  34. implementation
  35.  
  36. {$R *.lfm}
  37.  
  38. { TForm1 }
  39.  
  40. procedure TForm1.klikrezultat(Sender: TObject);
  41.   var udaljenost, potrosnja, cena, rezultat : real;
  42. begin
  43. udaljenost := StrToFloat (Edit1.text);
  44. potrosnja := StrToFloat (Edit2.text);
  45. cena := StrToFloat (Edit3.text);
  46. rezultat := 2*udaljenost*cena*potrosnja/100;
  47. Edit4.Text := FloatToStr(rezultat);
  48.  
  49.  
  50. end;
  51.  
  52. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top