Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Delphi by Koky ( 13 years ago )
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Image1: TImage;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
var k: integer;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
i, j: Integer;
TextPola: String;
pole: array[1..5] of integer;
begin
Randomize;
Image1.Canvas.pen.Color:=clwhite ;
Image1.canvas.rectangle(0,0,Image1.Width, Image1.Height);
for i:=1 to 10 do
for j:=1 to 5 do
begin
pole[j]:=random(35)+1;
if pole[j]:=pole[j-1] OR pole[j]:= pole[j-2] or pole[j]:=pole[j-3] or pole[j]:=pole[j-4]
begin
TextPola:=IntToStr(pole[j]);
Image1.Canvas.TextOut(20*j-15, 20*i, TextPola +' ');
end;
end;
end;
end.
Revise this Paste