2 Replies - 1565 Views - Last Post: 16 May 2011 - 11:09 PM Rate Topic: -----

#1 gracem  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 16-May 11

how to do a multiplication table in delphi using a memo?

Posted 16 May 2011 - 02:46 AM

how to do a multiplication tabel in delphi using a memo
what i know is that i should enter the data in strings and put line by line in the output but i am new in delphi and the code is not working with me( memo1.lines := '123456789')
Is This A Good Question/Topic? 0
  • +

Replies To: how to do a multiplication table in delphi using a memo?

#2 darek9576  Icon User is offline

  • D.I.C Lover

Reputation: 198
  • View blog
  • Posts: 1,693
  • Joined: 13-March 10

Re: how to do a multiplication table in delphi using a memo?

Posted 16 May 2011 - 03:24 AM

Why would you use delphi.
Was This Post Helpful? 0
  • +
  • -

#3 gracem  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 16-May 11

Re: how to do a multiplication table in delphi using a memo?

Posted 16 May 2011 - 11:09 PM

View Postdarek9576, on 16 May 2011 - 03:24 AM, said:

Why would you use delphi.


It is recommended at work
anyway it worked:

var a : array [1..10, 1..10] of integer;
i: Integer;
j: Integer;
s,v: string;
begin
memo1.Clear;
for i := 1 to high(a) do
begin
for j := 1 to high(a[i]) do
a[i,j] := i*j;
end;
for i := 1 to high(a) do
begin
s := '';
for j := 1 to high(a[i]) do
begin
v := inttostr(a[i,j]);
s := s+#9+ v;
end;
memo1.Lines.Add(s);
end;


end;

end.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1