#dc, 10 - 25 = -15
dc, 10 - 25 = -15
2?A*Ar^1-n
Takes a blank line for "no input".
Calculates 10 ^ (10 * n) - 1, where n is the input, or 2 if input is empty. Prints a string of 9s of the required length.
2push 2 to the stack in case input is empty?push input to the stackApush 10 to the stack (dc has shortcutsA-Ffor 10 - 15)*pop twice and multiply (multiply input by 10)Apush 10 to the stackrreverse top two stack elements^exponentiate 10 ^ (10 * input)1-subtract 1 from the top of stacknprint with no newline.
#dc, 10 - 25 = -15
2?A*Ar^1-n
Takes a blank line for "no input".
Calculates 10 ^ (10 * n) - 1, where n is the input, or 2 if input is empty. Prints a string of 9s of the required length.
2push 2 to the stack in case input is empty?push input to the stackApush 10 to the stack (dc has shortcutsA-Ffor 10 - 15)*pop twice and multiply (multiply input by 10)Apush 10 to the stackrreverse top two stack elements^exponentiate 10 ^ (10 * input)1-subtract 1 from the top of stacknprint with no newline.
dc, 10 - 25 = -15
2?A*Ar^1-n
Takes a blank line for "no input".
Calculates 10 ^ (10 * n) - 1, where n is the input, or 2 if input is empty. Prints a string of 9s of the required length.
2push 2 to the stack in case input is empty?push input to the stackApush 10 to the stack (dc has shortcutsA-Ffor 10 - 15)*pop twice and multiply (multiply input by 10)Apush 10 to the stackrreverse top two stack elements^exponentiate 10 ^ (10 * input)1-subtract 1 from the top of stacknprint with no newline.
#dc, 10 - 25 = -15
2?A*Ar^1-pn
Takes a blank line for "no input".
Calculates 10 ^ (10 * n) - 1, where n is the input, or 2 if input is empty. Prints a string of 9s of the required length.
2push 2 to the stack in case input is empty?push input to the stackApush 10 to the stack (dc has shortcutsA-Ffor 10 - 15)*pop twice and multiply (multiply input by 10)Apush 10 to the stackrreverse top two stack elements^exponentiate 10 ^ (10 * input)1-subtract 1 from the top of stacknprint with no newline.
#dc, 10 - 25 = -15
2?A*Ar^1-p
Takes a blank line for "no input".
#dc, 10 - 25 = -15
2?A*Ar^1-n
Takes a blank line for "no input".
Calculates 10 ^ (10 * n) - 1, where n is the input, or 2 if input is empty. Prints a string of 9s of the required length.
2push 2 to the stack in case input is empty?push input to the stackApush 10 to the stack (dc has shortcutsA-Ffor 10 - 15)*pop twice and multiply (multiply input by 10)Apush 10 to the stackrreverse top two stack elements^exponentiate 10 ^ (10 * input)1-subtract 1 from the top of stacknprint with no newline.
#dc, 10 - 25 = -15
2?A*Ar^1-p
Takes a blank line for "no input".