type TForm1 = class(TForm) Image1: TImage; Button1: TButton; OpenDialog1: TOpenDialog; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;
var Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject); begin if OpenDialog1.Execute then begin Image1.Picture.LoadFromFile(OpenDialog1.FileName); Image1.Stretch:=true; Image1.Left:=form1.Width div 2-image1.Width div 2; Image1.top:=form1.Height div 2-image1.Height div 2; end end;
1)uses crt; var x,a,b,c,i: integer; begin cls; write('введите число: '); readln(x); a: = x div 100; b: = (x - a*100) div 10; c: = (x - a*100 - b*10); if (a=b) or (a=c) or (b=c) then writeln('есть одинаковые цифры') else writeln('одинаковых цифр нет'); end.2)uses crt; var x: real; begin cls; write('сумма покупки: '); readln(x); if x> 1000 then x: =x-(x*0.1); writeln('стоимость с учётом возможной скидки ',x); end.
13
Объяснение:
1) 4,7 * 1024 = 4812,8 (Мбайт) - ёмкость DV в Мбайтах;
2) 4812,8 / 350 ≈ 13 (шт.) - можно разместить на диске.
ответ: 13 учебников.