Jump to content

Sayının Altını Çizdirmek ?


pilgetir
 Share

Recommended Posts

Merhaba arkadaşlar ben bir işim için fonksiyon hazırladım.Rastgele sayı üretiyor ama ben bu ürettiğim birinci sayının hemen yanına dikey çizgi insin istiyorum yani bir türlü yapamadım.Dikey çizgi indirmek yerin /_________ çizgilerini koydum.Ama benim istediğim "local s"değişkeninde üretilen sayının yanına dikey çizgi indirmek ve ikinci sayıyıda o çizginin yanıan yazmak. Aşağıdaki fonksiyonda ne gibi bi değişiklik yapmam lazım ?

[quote]function rastgele_sayi_bol_bes(sayi,nesne)
local str = "";
for i=1,sayi do
local s = Math.Random(10000, 99999)
local s_t = Math.Random(10000, 99999)
str = str.." "..s.."\r\n".." "..s_t.."\r\n /__________".."\r\n\r\n";
end
Input.SetText(nesne,str)
end[/quote] Edited by pilgetir
Link to comment
Share on other sites

doğru anladıysam

[quote]function rastgele_sayi_bol_bes(sayi,nesne)
local str = "";
for i=1,sayi do
local s = Math.Random(10000, 99999)
local s_t = Math.Random(10000, 99999)
str = str.." "..s.."|".." "..s_t.."\r\n\r\n";
end
Input.SetText(nesne,str)
end[/quote]

kod bu şekilde olacak çıktısıda suna benziyor:

[quote] 45561| 11763

42221| 44239

71223| 76557

10499| 47481[/quote]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...