linkedin facebook linkedin facebook nod32

Delphi dasturlash tilida kitobcha shaklda tayyorlaydigan dastur

Muallif: Mengliyev Sh.

Qo`shilgan sana: 2014-10-29

Delphi dasturlash tilida kitobcha shaklda tayyorlaydigan dastur

Dasturning dizayni yaratib olamiz

Dastur kodi
unit kitob;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Menus, Buttons;

type
TForm1 = class(TForm)
Label1: TLabel;
Button1: TButton;
edit1: TEdit;
Label2: TLabel;
Edit2: TEdit;
Label3: TLabel;
Edit3: TEdit;
Label4: TLabel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure Button1Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
label 1;
var n,i,q,k:integer;
s1,s2:string;
begin
n:=StrToInt(edit1.text);
q:=n mod 4;
if q<>0 then
begin
if q=1 then Label4.Caption:='sahifalar sonini'+IntToStr(n+3)+' taga yetkazing';
if q=2 then Label4.Caption:='sahifalar sonini'+IntToStr(n+2)+' taga yetkazing';
if q=3 then Label4.Caption:='sahifalar sonini'+IntToStr(n+1)+' taga yetkazing';
edit2.text:='';edit3.text:='';
goto 1;
end;
Label4.Caption:='printerga '+IntToStr(n div 4)+' dona toza qog`oz qo`ying';
i:=0;s1:='';s2:='';k:=n div 4-1;
while i<=k do
begin
s1:=s1+IntToStr(n-2*i)+','+inttostr(1+2*i);
if i<>k then s1:=s1+',';
edit2.text:=s1;
s2:=s2+IntToStr(n div 2-2*i)+','+inttostr(n div 2+1+2*i);
if i<>k then s2:=s2+',';
edit3.text:=s2;
i:=i+1;
end;

 

1: end;

 

 

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
Edit2.CopyToClipboard;
end;

procedure TForm1.BitBtn2Click(Sender: TObject);
begin
Edit3.CopyToClipboard;
end;

end.

 

2389 marta o`qildi.

Parol:
Eslab qolish.


Ro`yhatdan o`tish

testing

+998915878681

Siz o`z maxsulotingizni 3D reklama ko`rinishda bo`lishini xohlaysizmi? Unda xamkorlik qilamiz.

3D Reklama


Рейтинг@Mail.ru
Рейтинг@Mail.ru

Besucherzahler
счетчик посещений