Ищу помощь!!! Дело жизни и смерти...помогите сделать задачку. Содержание такое: Запросить координаты 4-х точек, нарисовать четырехугольник и провести в нем диагонали. Прошу вас, помогите...Нужно к завтра. Иначе плохо мне будет. Если можете, то чуточку в подробностях, как делать))) Заранее благодарю
1. Запрашиваешь координаты.
2. Рисуешь.
3. Проводишь диагонали.
В каком из этапов у тебя возникли проблемы ?
я бы п.2 и 3 объединила: соединяешь каждую пару точек
Настя, купить конечно проще всего, не здесь, так в другом месте. Но не будет ли приятней, разобравшись, решить всё самой? Просто корректно задавай вопрос о том, что ты не можешь сделать и постепенно мы поможем тебе написать эту программку.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
screen: TPaintBox;
startstopbtn: TButton;
procedure startstopbtnClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
isrunning: Boolean;
implementation
{$R *.dfm}
procedure TForm1.startstopbtnClick(Sender: TObject);
const width=100;
height=90;
var x,y :Integer;
rx,ry :Integer;
field :array [0..width+1,0..height +1] of Boolean;
changes :array [0..width + 1,0..height +1] of Boolean;
s,i,j:Integer;
begin
if isrunning then
begin
isrunning :=False;
startstopbtn. Caption :='ПУСК';
Exit;
end;
STARTSTOPBTN.caption:='стоп';
isrunning:=True;
rx:=(screen.width div width)div 2;
ry:= (screen.height div height )div 2;
Randomize;
Screen.refresh;
for i :=0 to width + 1 do
for j :=0 to height +1 do
begin
field[i,j] := False;
changes[i,j] :=False;
end;
for i := 1 to width do
for j :=1 to height do
if Random(4)=0 then
begin
field[i,j] := True;
screen.Canvas.Ellipse((2*i-1)*rx - rx, (2*j - 1 )*ry - ry,
(2*i-1)*rx + rx , (2*j-1)*ry+ry);
end;
while isrunning do
begin
for i := 1 to width do
for j := 1 to height do
begin
if field [i,j] then
Screen.canvas.pen.color := clblue
else screen.canvas.pen.color:=clbtnface;
Screen.canvas. Ellipse((2*i - 1)*rx-rx,(2*j-1)*ry-ry,
(2*i-1)*rx+rx,(2*j - 1 )*ry + ry);
end;
for x := 1 to width do
for y :=1 to height do
begin
s:=0;
for i:=-1to 1 do
for j := -1 to 1 do
s:=s + ord(field [x +i] [y+j]);
s:=s - ord (field [x][y]);
if((field[x,y] = False) and (s=3)) or
((field[x,y] = True) and ((s<2) or (s>3)))then
changes[x,y]:= True;
end;
for x:=1 to width do
for y:=1 to height do
if changes [x,y] then
begin
field[x,y]:=not field[x,y];
changes[x,y]:= False;
end;
sleep(100);
application.processmessages;
end;
end;
end.
Why not settling on games that is fun and at the same time your earning. Well it'll make suspense because the game is well but dude just try it and it gave me hope while pandemic is real rn. https://dripivplus.com/most-played-slot-games/