0
I was looking for a very easy task to look how short of a code can be produced on a beginners exercise.
The goal is to produce a simple table that looks like this common java/c# code is about 4 lines. So get your golfing-languages ready ;) Try to align the matrix in any way it is readable.
1 2 3 .. 10 2 4 6 .. 20 3 6 9 .. 30 . . . .. . 10 20 30 .. 100
EDIT: The first answer below shows a propper alignment and solution
Can you provide an example of the desired output ? Or are you asking us to print the 10*10 matrix ? – The random guy – 2018-05-28T08:07:23.707
yes, just the 10x10 matrix – Comann Silvan – 2018-05-28T08:19:49.593
2
Looks like a simplified version of Print this Multiplication Table and Addition/Multiplication table generator. Not much challenging. Though occasionally the extremely simple questions' popularity is much higher. Unless closed. So I suggest to specify whether input will be provided, output must be text or formatted array is fine and whether the numbers need some kind of alignment.
– manatwork – 2018-05-28T08:23:58.5831Nice first challenge, but you would be wise to specify more clearly what exactly is required. E.g. may we return a list of ten lists? Don't use the word "Try"; either require it or say it isn't required. Etc. – Adám – 2018-05-28T08:28:17.583
1If you do require alignment, which alignments are acceptable (left, right, all columns same width, single/multiple space separating columns, additional white space left and/or right, etc.)? – Adám – 2018-05-28T08:29:39.653
5Please give one or more complete correct outputs. One might think that the output actually needs all the dots. – Adám – 2018-05-28T08:30:23.317
1There's some grammatical problem in the sentence The goal is to produce a simple table that looks like this common java/c# code is about 4 lines. – Adám – 2018-05-28T08:30:55.290
Although not exactly duplicate, I think that this challenge is too similar to be interesting. It will only be closed if there are 5 people (or a gold badge holder) agree with that and nobody vote to reopen. – user202729 – 2018-05-28T10:11:28.417
3I don't think anybody has mentioned this yet, but welcome to PPCG! – Giuseppe – 2018-05-28T11:31:39.557
My answer before it was closed – sergiol – 2018-05-28T13:00:07.393
@sergiol Annoying when a question gets closed just when you wanted to post an answer, isn't it? ;) My answer in Java 10 and my answer in 05AB1E. Both probably golfable (second one especially, I'm pretty new to 05AB1E).
– Kevin Cruijssen – 2018-05-28T13:46:48.083Strange, it looks like the system somehow allowed me to post an answer when it was already closed! Nevertheless, I think it is not very nice to close a challenge, which is not technically an exact duplicate, when it has already accumulated a dozen of answers! – Kirill L. – 2018-05-28T14:15:56.597
@KevinCruijssen: The maximum you can do about it is voting to reopen! – sergiol – 2018-05-28T14:17:06.643
@KirillL. Can I suggest you voting to reopen? – sergiol – 2018-05-28T14:17:53.607
@sergiol I already did... – Kirill L. – 2018-05-28T14:19:30.167
I would vote to reopen but I have a gold badge, and I think this should be closed as unclear rather than a dupe. – Giuseppe – 2018-05-28T17:07:35.897
@Giuseppe: For me the output sample made very clear what the question's poster want people to answer. – sergiol – 2018-05-29T09:22:47.207