25 lines
602 B
Text
25 lines
602 B
Text
#include <basico.h>
|
|
|
|
algoritmo
|
|
|
|
n=0, c="",
|
|
temp = 0, candidatos={}
|
|
|
|
'123, 12345, 1234567, 987654321, 10001, -10001,-123'
|
|
'-100, 100, -12345,1, 2, -1, -10, 2002, -2002, 0'
|
|
enlistar en 'candidatos'
|
|
|
|
decimales '0'
|
|
|
|
tomar 'candidatos', quitar el signo
|
|
convertir a cadena ---retener---, obtener largo, mover a 'n',
|
|
guardar en 'temp'
|
|
|
|
guardar ' replicar ( temp, #(n>=3 && not(is even(n))))' en 'c'
|
|
token.separador(NL)
|
|
|
|
justificar derecha(11,#(string(candidatos))), " : ", concatenar esto
|
|
#( copy( 3, (n/2-1), c ) ), unir esto
|
|
|
|
luego imprime
|
|
terminar
|