+++++^^DONE.U^[]]]]++[{]PPPPPPPPPPRPD-^)!:}
Try it here! Code will need to be copied, and executed like this:
erun("+++++^^DONE.U^[]]]]++[{]PPPPPPPPPPRPD-^)!:}")
My first code golf answer. One trailing newline.
Thanks to @Aaroneous Miller for -1 by showing me N
is valid for no input programs.
Explanation:
+++++^^DONE.U^[]]]]++[{]PPPPPPPPPPRPD-^)!:}
+++++ # add 5 to r0
^^ # add r0 to r1 twice
D # set r0 to r1 (10)
O # push r0 to array
N # set r0 to 1 if no input
E. # jump to r0th . and set non string registers to 0
U # set r0 to first item in array (10)
^ # add r0 to r1
[ # set r2 to r0 and set r0 to 0
]]]] # add r2 to r0 4 times (40)
++ # add 2 to r0
[ # set r2 to r0 (42) and set r0 to 0
{ } # loop
] # add r2 to r0 (42)
PPPPPPPPPP # concatenate r0 (*) to the string register 10 times (**********)
RP # set r0 to the first item of the array again (10) and concatenate r0 (\n) to the string register (**********\n)
D-^ # decrement r1 and set r0 to r1
) # if r0 != r3 (0), jump past next :. either way, set r0 to r3 (0)
! # print string register
: # jump to next ; (eof halt)
If there's a better way to format these, let me know, I just saw everyone else doing it haha