Talk:Four sides of square: Difference between revisions

From Rosetta Code
Content added Content deleted
(the task)
 
(→‎Task: Commented.)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
==Task==
==Task==


In case anyone is wondering what this task actually is, it's to create a square matrix where the four edges are filled with <code>1</code>, while the interior is filled with <code>0</code>. For example, for size = 5,
In case anyone is wondering what this task actually is, it's to output a square matrix (preferably using a GUI?) where the four edges are filled with <code>1</code>, while the interior is filled with <code>0</code>. For example, for size = 5,


1 1 1 1 1
1 1 1 1 1
Line 10: Line 10:


--[[User:Chunes|Chunes]] ([[User talk:Chunes|talk]]) 07:54, 18 February 2022 (UTC)
--[[User:Chunes|Chunes]] ([[User talk:Chunes|talk]]) 07:54, 18 February 2022 (UTC)

:Thanks, saved me having to figure out what the Ring code does :)

:Good idea, BTW, to use Wikimedia Commons to upload the image for the Red entry rather than some obscure image sharing site. I've designed my Wren image to look similar so there's no need to upload it again. --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 10:34, 18 February 2022 (UTC)

Latest revision as of 10:34, 18 February 2022

Task

In case anyone is wondering what this task actually is, it's to output a square matrix (preferably using a GUI?) where the four edges are filled with 1, while the interior is filled with 0. For example, for size = 5,

   1 1 1 1 1
   1 0 0 0 1
   1 0 0 0 1
   1 0 0 0 1
   1 1 1 1 1

--Chunes (talk) 07:54, 18 February 2022 (UTC)

Thanks, saved me having to figure out what the Ring code does :)
Good idea, BTW, to use Wikimedia Commons to upload the image for the Red entry rather than some obscure image sharing site. I've designed my Wren image to look similar so there's no need to upload it again. --PureFox (talk) 10:34, 18 February 2022 (UTC)