| Bytes | Lang | Time | Link |
|---|---|---|---|
| 010 | Vyxal 3 | 250417T152600Z | pacman25 |
| 043 | Raku Perl 6 rakudo | 250416T214952Z | xrs |
| 117 | SAKO | 250417T114435Z | Acrimori |
| 054 | JavaScript | 170731T105442Z | Shaggy |
| 047 | AWK | 250408T174932Z | xrs |
| 061 | Python 3.8 prerelease | 211209T150306Z | Larry Ba |
| 078 | Retina | 170731T103840Z | Neil |
| 005 | NotQuiteThere | 171223T062241Z | caird co |
| 066 | PHP 7.1 | 171221T174636Z | Titus |
| 031 | Perl 5 | 170731T181645Z | Xcali |
| nan | ><> | 171220T153412Z | Jo King |
| nan | Sinclair ZX81/Timex TS1000/1500 BASIC ~73 tokenized BASIC bytes | 171220T131336Z | Shaun Be |
| 041 | Excel VBA | 171220T130015Z | Taylor R |
| 085 | SNOBOL4 CSNOBOL4 | 171219T202405Z | Giuseppe |
| nan | Mathematica | 170731T130655Z | ZaMoC |
| nan | JavaScript ES6 + CSS | 170802T213827Z | Justin M |
| 082 | C | 170801T000740Z | Asleepac |
| 043 | SmileBASIC | 170802T012247Z | calc84ma |
| 029 | K3 | 170802T000039Z | tangents |
| 010 | Bash + coreutils | 170731T160754Z | Digital |
| 080 | Tcl | 170801T182244Z | sergiol |
| 061 | Python 2 | 170731T100208Z | 0xffcour |
| 048 | Mathematica | 170801T085422Z | ZaMoC |
| 061 | R | 170731T095747Z | JAD |
| 050 | WendyScript | 170731T215054Z | Felix Gu |
| 085 | Python 3 | 170731T205737Z | Kavi |
| 039 | Haskell | 170731T204401Z | xnor |
| 079 | Java 8 | 170731T190241Z | Justin M |
| 006 | 05AB1E | 170731T130125Z | Adnan |
| 012 | Japt | 170731T102101Z | Justin M |
| 119 | D | 170731T115513Z | Adalynn |
| 051 | dc | 170731T165657Z | brhfl |
| 046 | Haskell | 170731T160824Z | Laikoni |
| 054 | Python 2 | 170731T103737Z | Arfie |
| 009 | Japt | 170731T140554Z | ETHprodu |
| 024 | APL Dyalog | 170731T113620Z | Adá |
| 165 | C++ | 170731T130103Z | HatsuPoi |
| 049 | PowerShell | 170731T135827Z | AdmBorkB |
| 018 | Ruby | 170731T133447Z | G B |
| 008 | 05AB1E | 170731T114859Z | Erik the |
| 019 | Perl | 170731T125605Z | Dom Hast |
| 115 | Swift 4 | 170731T130257Z | Mr. Xcod |
| 011 | MATL | 170731T114728Z | Luis Men |
| 016 | V | 170731T122504Z | nmjcman1 |
| 085 | C# | 170731T112135Z | TheLetha |
| 038 | C gcc | 170731T094942Z | Giacomo |
| 043 | Python 2 | 170731T112842Z | Rod |
| 025 | QBIC | 170731T105337Z | steenber |
| 079 | Python 2 | 170731T095804Z | Nathan.E |
| 008 | Charcoal | 170731T093926Z | Charlie |
| 059 | Python 2 | 170731T101700Z | Simon |
| 053 | LOGO | 170731T101416Z | user2027 |
| 057 | JavaScript | 170731T100449Z | tsh |
| 009 | Jelly | 170731T101557Z | Leaky Nu |
| 013 | Pyth | 170731T100458Z | Leaky Nu |
Vyxal 3, 10 bytes
↯ƛ¹↯“L⎇¤«,
Vyxal rj, 57 bitsv2, 7.125 bytes
ṡƛ¹rṅLIJ
Bitstring:
100111111111011011001100011100000101101101001101000001100
Vyxal 3 really wants flags back, also push n spaces comes in clutch for v2
Raku (Perl 6) (rakudo), 43 bytes
{print "$_\n"~($!~=" "x.chars)for $^a..$^b}
{print # print without newline
"$_\n" # number with newline
~ # append
($! # accumulator
~=" " # append to space to accumulator
x.chars) # length of our number
for $^a..$^b} # loop it all
SAKO, 117 bytes
PODPROGRAM:F(N,M)
CALKOWITE:I,Z
Z=0
L=1
*)Z=Z+L
L=LN(1×0*I+I)/LN(10)+1
SPACJIZ
DRUKUJ(0):I
LINIA
POWTORZ:I=N(1)M
WROC
Takes input in ascending order.
Full programme version, 119 bytes
CALKOWITE:I,Z
CZYTAJ:N,M
Z=0
L=1
*1)Z=Z+L
L=LN(1×0*I+I)/LN(10)+1
SPACJIZ
DRUKUJ(0):I
LINIA
POWTORZ:I=N(1)M
STOP1
KONIEC
JavaScript, 69 67 62 54 bytes
Takes input as integers, in ascending order, using currying syntax. Includes a leading newline and a leading space on each line.
x=>y=>(g=s=>x+~y?s+`
`+g(``.padEnd(s.length)+x++):s)``
AWK, 47 bytes
{for(;$1<=$2;)printf"%*d\n",s+=length($1),$1++}
{for(;$1<=$2;) # loop from first to second arg
printf"%*d\n", # print with padding
s+=length($1), # previous pad plus new number pad
$1++} # print number and inc
Python 3.8 (pre-release), 61 bytes
def f(a,b,n=-1):
for a in range(a,b+1):print(" "*(n:=n+1),a)
Retina, 81 78 bytes
.+
$*
+`\b(1+)¶11\1
$1¶1$&
1+
$.& $.&
(.+)
$.1$*
+1`( *)(.+?)( +)¶
$1$2¶$1$3
Try it online! Takes input as a newline-separated list of two integers. Edit: Saved 3 bytes by stealing the range-expansion code from my answer to Do we share the prime cluster? Explanation:
.+
$*
Convert both inputs to unary.
+`\b(1+)¶11\1
$1¶1$&
While the last two elements (a, b) of the list differ by more than 1, replace them with (a, a+1, b). This expands the list from a tuple into a range.
1+
$.& $.&
Convert back to decimal in duplicate.
(.+)
$.1$*
Convert the duplicate copy to spaces.
+1`( *)(.+?)( +)¶
$1$2¶$1$3
Cumulatively sum the spaces from each line to the next.
NotQuiteThere, 5 bytes
yr-11
Uses the vertical tab trick in Rod's python answer, so doesn't really work on TIO. Input is taken in descending order (11, 7)
PHP 7.1, 66 bytes
for([,$i,$z]=$argv;$i<=$z;)printf("%".($e+=strlen($i))."d
",$i++);
Run with -nr or try them online.
><>, 56+3 = 59 bytes
1</+1$,a\.0e:/o" "\
:1>$:a)?/~}r+\1-:?/~r:n&:&:&=?;&1+ao
+3 bytes for -v. Not sure whether I actually need to add this for a function, but better to err on the side of caution
How It Works
1<................\ Initialises the stack with the space counter on top of the inputted numbers
................../~...
................... Print the first number
....................r:n&:&:&=?;&1+ao If the first number is equal to the end, exit program. Otherwise increment the first number and print a newline
../+1$,a\... Count the number of digits in the number
:1>$:a)?/... By incrementing a counter and dividing the number by 10 until it's below 10
........\.0e:/... Add the amount of digits to the counter
.......?/~}r+\...
............./o" "\ Print the counter amount of spaces and loop around again
.............\1-:?/~...
Sinclair ZX81/Timex TS1000/1500 BASIC ~73 tokenized BASIC bytes
1 LET X=SGN PI
2 LET Y=CODE "="
3 LET A=NOT PI
4 FOR I=X TO Y
5 PRINT TAB A;I
6 LET A=A+LEN STR$ I
7 NEXT I
This newer solution has fewer bytes but slightly slower. SGN PI is 1, CODE "=" is 20 and NOT PI is 0; the PRINT TAB command does what you might expect, except a TAB in ZX81 land is 1 space; A is increased by the length of the I variable once converted to a string.
Old answer (~98 tokenized bytes)
1 LET X=1
2 LET Y=20
3 LET A$=""
4 FOR I=X TO Y
5 PRINT A$;I
6 FOR T=1 TO LEN STR$ I
7 LET A$=A$+" "
8 NEXT T
9 NEXT I
I'm using the most expensive methods here in terms of bytes (i.e., SGN PI is 1, and counts as two bytes in ZX81 land, whereas 1 counts as four bytes), so I could cut the byte count by increasing the typing and making the listing less readable, and slower.
The 'spacing' works by converting the I number to a string and taking the string literal length, using that in a FOR/NEXT loop as the destination [line 6]. X is the start number, and Y is the end number.
There are a few limitations to consider, such as only having a 32 columns display by default, and only allowing 22 rows without some POKEing. Also, the screen doesn't scroll when it is full unless you tell it to, with the command SCROLL.
Excel VBA, 41 Bytes
Anonymous VBE immediate window function that takes input from range A1:B1 and outputs to the VBE immediate window
For i=[A1]To[B1]:?spc(j)i:j=j+len(i):Next
SNOBOL4 (CSNOBOL4), 85 bytes
M =INPUT
N =INPUT
O OUTPUT =S M
S =S DUPL(' ',SIZE(M))
M =LT(M,N) M + 1 :S(O)
END
Mathematica, 59, bytes
Grid[(DiagonalMatrix@Range[1+##]/. 0->""+1)-1,Spacings->0]&
input
[10,15]
-3 bytes @JungHwanMin
problem with 0 fixed (see comments for details)
thanx to @ngenisis
JavaScript (ES6) + CSS, 72 + 12 = 84 bytes
a=>b=>{for(i=0;a<=b;)document.write(`<x>${"<br>".repeat(i++)+a++}</x>`)}
x{float:left
Takes input in currying syntax with the smaller number first. Outputs the result to the page in HTML.
Test Snippet
let f=
a=>b=>{for(i=0;a<=b;)document.write(`<x>${"<br>".repeat(i++)+a++}</x>`)}
f(0)(8)
f(5)(14)
f(998)(1003)
x{float:left
C, 166 134 95 82 Bytes
New Answer
Just as a function not as a whole program.
f(a,b){int s=0,i;while(a<=b){i=s;while(i--)printf(" ");s+=printf("%i\n",a++)-1;}}
Thanks to Falken for helping knock off 13 Bytes (and fix a glitch)!
Thanks to Steph Hen for helping knock off 12 Bytes!
Thanks to Zacharý for help knock off 1 Byte!
Old Answers
Got rid of the int before main and changed const char*v[] to char**v and got rid of return 0;
main(int c,char**v){int s=0;for(int a=atoi(v[1]);a<=atoi(v[2]);a++){for(int i=0;i<s;i++)printf(" ");printf("%i\n",a);s+=log10(a)+1;}}
int main(int c,const char*v[]){int s=0;for(int a=atoi(v[1]);a<=atoi(v[2]);a++){for(int i=0;i<s;i++)printf(" ");printf("%i\n",a);s+=log10(a)+1;}return 0;}
This is my first time golfing and I wanted to try something in C. Not sure if I formatted this correctly, but I had fun making it!
int main(int c, const char * v[]) {
int s = 0;
for(int a=atoi(v[1]); a<=atoi(v[2]); a++) {
for(int i=0; i<s; i++) printf(" ");
printf("%i\n",a);
s += log10(a)+1;
}
return 0;
}
Explanation
int s = 0; // Number of spaces for each line
for(int a=atoi(argv[1]); a<=atoi(argv[2]); a++) { // Loop thru numbers
for(int i=0; i<s; i++) printf(" "); // Add leading spaces
printf("%i\n",a); // Print number
s += log10(a)+1; // Update leading spaces
Usage
SmileBASIC, 43 bytes
INPUT A,B
FOR I=A TO B?" "*C;I;
C=CSRX?NEXT
Explanation
?" "*C;I; 'Print C (initially 0) spaces followed by I, with no newline.
C=CSRX 'Set C to the horizontal cursor position.
? 'Print a newline.
K3, 29 bytes
{`0:{(1_0+\#:'$:'x)$'x}x+!y-x}
example:
{`0:{(1_0+\#:'$:'x)$'x}x+!y-x}[1;15]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Bash + coreutils, 10
seq -s^K $@
Here ^K is a literal vertical tab and control character. The xxd dump of this script is as follows - use xxd -r to regenerate the actual script:
00000000: 7365 7120 2d73 0b20 2440 seq -s. $@
Input range is given as two integers at the command-line.
Not sure if much of an explanation is needed here - seq simply does the counting (from a to b, passed in the $@ parameter), with -s specifying the separator as a vertical tab. This causes the next number to be printed after the previous one, down one line, as required.
Tcl, 80 bytes
proc P a\ b {while \$a<=$b {puts [format %[incr i [string len $a]]d $a];incr a}}
Python 2, 65 63 62 61 bytes
-2 bytes Thanks to @Mr. Xcoder: exec doesn't need braces
-1 bye thanks to @Zacharý: print s*' ' as print' '*s
def f(m,n,s=0):exec(n-m+1)*"print' '*s+`m`;s+=len(`m`);m+=1;"
Mathematica, 48 bytes
Rotate[""<>Table[ToString@i<>" ",{i,##}],-Pi/4]&
since there are so many answers, I thought this one should be included
input
[0,10]
R, 70 69 61 bytes
function(a,b)for(i in a:b){cat(rep('',F),i,'
');F=F+nchar(i)}
Function that takes the start and end variable as arguments. Loops over the sequence, and prints each element, prepended with enough spaces. F starts as FALSE=0, and during each iteration, the amount of characters for that value is added to it. F decides the amount of spaces printed.
-8 bytes thanks to @Giuseppe
WendyScript, 50 bytes
<<f=>(x,y){<<s=""#i:x->y+1{s+i#i!=0{s+=" "i\=10}}}
f(95, 103)
Only issue is once you get past 100000, numbers are outputted in scientific notation (which I should probably change to always display in full form). The online syntax highlighter also dislikes "" but it is parsed correctly.
Python 3, 85 bytes
f=lambda a,b,n,z:'\n'+' '*(a+n-z)+str(a)+f(a+1,b,n+len(str(a))-1,z) if a!=b+1 else ''
Java 8, 79 bytes
(a,b)->{for(String s="";a<=b;System.out.printf("%"+s.length()+"d\n",a++))s+=a;}
05AB1E, 8 7 6 bytes
Thanks to Magic Octopus Urn for saving a byte!
It somehow works, but honestly I have no idea why.
Code
Ÿvy.O=
Uses the 05AB1E encoding. Try it online!
Explanation
Ÿ # Create the range [a, .., b] from the input array
vy # For each element
.O # Push the connected overlapped version of that string using the
previous version of that string. The previous version initially
is the input repeated again. Somehow, when the input array is
repeated again, this command sees it as 1 character, which gives
the leading space before each line outputted. After the first
iteration, it reuses on what is left on the stack from the
previous iteration and basically attaches (or overlaps) itself
onto the previous string, whereas the previous string is replaced
by spaces and merged into the initial string. The previous string
is then discarded. We do not have to worry about numbers overlapping
other numbers, since the incremented version of a number never
overlaps entirely on the previous number. An example of 123 and 456:
123
456
Which leaves us " 456" on the stack.
= # Print with a newline without popping
Japt, 12 bytes
òV
£¯Y ¬ç +X
Takes input in either order and always returns the numbers in ascending order, as an array of lines.
Try it online! with the -R flag to join the array with newlines.
Explanation
Implicit input of U and V.
òV
£
Create inclusive range [U, V] and map each value to...
¯Y ¬ç
The values before the current (¯Y), joined to a string (¬) and filled with spaces (ç).
+X
Plus the current number. Resulting array is implicitly output.
D, 133 127 126 125 121 119 bytes
import std.conv,std.stdio;void f(T)(T a,T b,T s=0){for(T j;j++<s;)' '.write;a.writeln;if(a-b)f(a+1,b,s+a.text.length);}
Jelly and APL were taken.
If you're fine with console-dependent results (goes off the same principle as Giacomos's C answer) here's one for 72 71 bytes:
import std.stdio;void f(T)(T a,T b){while(a<=b){a++.write;'\v'.write;}}
How? (Only D specific tricks)
f(T)(T a,T b,T s=0)D's template system can infer typesfor(T j;j++<s;)Integers default to0.' '.write;a.writelnD lets you callfun(arg)likearg.fun(one of the few golfy things D has)a.text.lengthSame as above, and D also allows you to call a method with no parameters as if it was a property (textis conversion to string)- One thing that might be relevant (I didn't use this though) newlines can be in strings!
dc, 51 bytes
sj0skp[32Plkll1+dsl<S]sS[0sldZlk+sklSx1+pdlj>M]dsMx
This pretty much has to be suboptimal, my brain is clearly still in Monday mode.
Pretty much just macro S printing spaces, and macro M doing the rest of the work. Register l restarts at zero spaces before running S, and compares against register k, which we always increment by the number of digits of top-of-stack.
Haskell, 46 bytes
a%b=[([a..x-1]>>=show>>" ")++show x|x<-[a..b]]
Try it online! Usage: 0%20. Returns a list of lines. Use putStr . unlines $ 0%20 for pretty-printing.
Japt, 10 9 bytes
òV åÈç +Y
Test it online! Returns an array of lines; -R flag included to join on newlines for easier viewing.
Explanation
òV åÈ ç +Y
UòV åXY{Xç +Y} Ungolfed
Implicit: U, V = inputs, P = empty string
UòV Create the range [U, U+1, ..., V-1, V].
åXY{ } Cumulative reduce: Map each previous result X and current item Y to:
Xç Fill X with spaces.
+Y Append Y.
Implicit: output result of last expression
Old version, 10 bytes:
òV £P=ç +X
òV £ P= ç +X
UòV mX{P=Pç +X} Ungolfed
Implicit: U, V = inputs, P = empty string
UòV Create the range [U, U+1, ..., V-1, V].
mX{ } Map each item X to:
Pç Fill P with spaces.
+X Append X.
P= Re-set P to the result.
Implicitly return the same.
Implicit: output result of last expression
APL (Dyalog), 25 24 bytes
-1 thanks to Zacharý.
Assumes ⎕IO←0 for zero based counting. Takes the lower bound as left argument and the upper bound as right argument.
{↑⍵↑⍨¨-+\≢¨⍵}(⍕¨⊣+∘⍳1--)
(…) apply the following tacit function between the arguments:
- subtract the upper lower from the upper bound
1- subtract that from one (i.e. 1 + ∆)
⊣+∘⍳ left lower bound plus the integers 0 through that
⍕¨ format (stringify) each
{…} apply the following anonymous on that (represented by ⍵):
≢¨ length of each (number)
+\ cumulative sum
- negate
⍵↑⍨¨ for each stringified number, take that many characters from the end (pads with spaces)
↑ mix list of strings into character matrix
C++, 167 165 bytes
-2 bytes thanks to Zacharý
#include<string>
#define S std::string
S d(int l,int h){S r;for(int m=0,i=l,j;i<=h;){for(j=0;j<m;++j)r+=32;S t=std::to_string(i++);r+=t;r+=10;m+=t.size();}return r;}
PowerShell, 49 bytes
$a,$b=$args;$a..$b|%{$l=($z=" "*$l+$_).length;$z}
Takes input as two command-line arguments, $a and $b, forms a range .. out of them, then loops |%{} over that range. Each iteration, we construct a string $z of a certain number of spaces " "*$l concatenated with our current number $_. We then pull out the .length of that, re-store it into $l for next time, and leave $z on the pipeline. Output is implicit.
Perl, 19 bytes
Note: \x0b is counted as one byte.
Along with others, I thought using cursor movements would be the shortest route, this does mean it doesn't work on TIO:
print"$_\x0b"for<>..<>
Usage
perl -e 'print"$_\x0b"for<>..<>' <<< '5
10'
5
6
7
8
9
10
Swift 4, 115 bytes
I think nobody would have posted a Swift solution anyway...
func f(l:Int,b:Int){for i in l...b{print(String(repeating:" ",count:(l..<i).map{String($0).count}.reduce(0,+)),i)}}
MATL, 11 bytes
vii&:"t~@Vh
Explanation
This works by generating a string for each number and concatenating it with a logically-negated copy of the previous string. Thus char 0 is prepended 0 as many times as the length of the previous string. Char 0 is displayed as a space, and each string is displayed on a different line
v % Concatenate stack (which is empty): pushes []
ii % Input two numbers
&: % Range between the two numbers
" % For each
t % Duplicate
~ % Logical negation. This gives a vector of zeros
@ % Push current number
V % Convert to string
h % Concatenate with the vector of zeros, which gets automatically
% converted into chars.
% End (implicit). Display stack (implicit), each string on a diferent
% line, char 0 shown as space
V, 16 bytes
ÀñÙywÒ $pça/jd
This would be way easier if I could take start end - start but I think that's changing the challenge a bit too much.
This takes the start number as input in the buffer and the end number as an argument. It actually creates the ladder from start to start + end and then deletes everything after the end number.
C#, 90 89 85 bytes
s=>e=>{var r="";for(int g=0;e>s;g+=(s+++"").Length)r+="".PadLeft(g)+s+"\n";return r;}
Saved 1 byte thanks to @LiefdeWen.
Saved 4 bytes thanks to @auhmaan.
Full/Formatted version:
namespace System
{
class P
{
static void Main()
{
Func<int, Func<int, string>> f = s => e =>
{
var r = "";
for (int g = 0; e > s; g += (s++ + "").Length)
r += "".PadLeft(g) + s + "\n";
return r;
};
Console.WriteLine(f(0)(5));
Console.WriteLine(f(0)(14));
Console.WriteLine(f(997)(1004));
Console.WriteLine(f(1)(10));
Console.WriteLine(f(95)(103));
Console.WriteLine(f(999999)(1000009));
Console.ReadLine();
}
}
}
C (gcc), 41 38 bytes
-3 bytes Thanks to ASCII-only
t(x,v){while(x<=v)printf("%d\v",x++);}
Works on RedHat6, accessed via PuTTY
Python 2, 43 bytes
lambda a,b:'\v'.join(map(str,range(a,b+1)))
Makes use of vertical tab to make the ladder effect. The way thet \v is rendered is console dependent, so it may not work everywhere (like TIO).

QBIC, 25 bytes
[:,:|A=space$(_lA|)+!a$?A
Explanation:
[: FOR a = <input 1 from cmd line>
,:| TO <input 2 from cmd line>
A= SET A$ to
space$ a number of spaces equal to
(_lA|) the current length of A$ (starts as "" = 0)
+!a$ and add a cast-to string of the current loop iterator
?A PRINT A$
Loop auto-closed by QBIC
Python 2, 78 77 79 bytes
def f(a,b):
for i in range(a,b+1):print sum(len(`j`)for j in range(i))*' '+`i`
f(A, B) will print the portion of the axis between A and B inclusive.
First time I answer a challenge!
Uses and abuses Python 2's backticks to count the number of spaces it has to add before the number.
-1 byte thanks to Mr.Xcoder
+2 because I forgot a +1
Charcoal, 9 8 bytes
F…·NN⁺¶ι
Link is to the verbose version of the code. Input in ascending order.
- 1 byte saved thanks to ASCII-only!
Python 2, 60 59 bytes
-1 byte thanks to Mr.Xcoder for defining my s=0 as an optional variable in my function.
def f(l,u,s=0):
while l<=u:print' '*s+`l`;s+=len(`l`);l+=1
I think it is possible to transfer this into a lambda version, but I do not know how. I also think that there is some sort of mapping between the spaces and the length of the current number, but this I also did not figure out yet. So I think there still is room for improvement.
What i did was creating a range from the lowerbound lto the upper bound u printing each line with a space multiplied with a number s. I am increasing the multiplier with the length of the current number.
LOGO, 53 bytes
[for[i ? ?2][repeat ycor[type "\ ]pr :i fd count :i]]
There is no "Try it online!" link because all online LOGO interpreter does not support template-list.
That is a template-list (equivalent of lambda function in other languages).
Usage:
apply [for[i ? ?2][repeat ycor[type "\ ]pr :i fd count :i]] [997 1004]
(apply calls the function)
will print
997
998
999
1000
1001
1002
1003
1004
Note:
This uses turtle's ycor (Y-coordinate) to store the number of spaces needed to type, therefore:
- The turtle need to be set to home in its default position and heading (upwards) before each invocation.
windowshould be executed ifycorgets too large that the turtle moves off the screen. Description ofwindowcommand:if the turtle is asked to move past the boundary of the graphics window, it will move off screen., unlike the default settingwrap, whichif the turtle is asked to move past the boundary of the FMSLogo screen window, it will "wrap around" and reappear at the opposite edge of the window.
Explanation:
for[i ? ?2] Loop variable i in range [?, ?2], which is 2 input values
repeat ycor That number of times
type "\ space character need to be escaped to be typed out.
pr :i print the value of :i with a newline
fd count :i increase turtle's y-coordinate by the length of the word :i. (Numbers in LOGO are stored as words)
JavaScript, 57 bytes
f=(x,y,s='')=>y>=x?s+`
`+f(x+1,y,s.replace(/./g,' ')+x):s



