¿cual es el codigo pascal y las etiquetas?
este programa funciona correctamente en Delphi 7
-------------------
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
Const N = 3;
I, J : Integer;
Valor : String;
Matriz1 : Array[1..N, 1..N] of Double;
Matriz2 : Array[1..N, 1..N] of Double;
M1XM2 : Array[1..N, 1..N] of Double;
begin
Memo1.Clear;
for I := 1 to N do
for J := 1 to N do begin
Valor := InputBox('Llenado de la primera matriz',
'escribir un numero', '00.00');
Matriz1[I, J] := StrToFloat(Valor);
Beep;
Valor := InputBox('Llenado de la segunda matriz',
'Escribir un numero', '00.00');
Matriz2[I, J] := StrToFloat(Valor);
M1XM2[I, J] := Matriz1[I, J] * Matriz2[I, J];
end; // Producto Matriz1 * Matriz2
Memo1.Lines.Add('(' + FloatToStr(Matriz1[I, J]) + ', ' +
FloatToStr(Matriz2[I, J]) + ') ---> ' + FloatToStr(M1XM2[I, J]));
end.
Copyright © 2024 ANSWERS.MX - All rights reserved.
Answers & Comments
Verified answer
este programa funciona correctamente en Delphi 7
-------------------
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
Const N = 3;
var
I, J : Integer;
Valor : String;
Matriz1 : Array[1..N, 1..N] of Double;
Matriz2 : Array[1..N, 1..N] of Double;
M1XM2 : Array[1..N, 1..N] of Double;
begin
Memo1.Clear;
for I := 1 to N do
for J := 1 to N do begin
Valor := InputBox('Llenado de la primera matriz',
'escribir un numero', '00.00');
Matriz1[I, J] := StrToFloat(Valor);
end;
Beep;
for I := 1 to N do
for J := 1 to N do begin
Valor := InputBox('Llenado de la segunda matriz',
'Escribir un numero', '00.00');
Matriz2[I, J] := StrToFloat(Valor);
end;
for I := 1 to N do
for J := 1 to N do begin
M1XM2[I, J] := Matriz1[I, J] * Matriz2[I, J];
end; // Producto Matriz1 * Matriz2
for I := 1 to N do
for J := 1 to N do begin
Memo1.Lines.Add('(' + FloatToStr(Matriz1[I, J]) + ', ' +
FloatToStr(Matriz2[I, J]) + ') ---> ' + FloatToStr(M1XM2[I, J]));
end;
end;
end.