29 lines
726 B
Text
29 lines
726 B
Text
#include <basico.h>
|
|
|
|
algoritmo
|
|
|
|
n=0, c="", m=0,
|
|
candidatos={}
|
|
|
|
'123, 12345, 1234567, 987654321, 10001, -10001,-123'
|
|
'-100, 100, -12345,1, 2, -1, -10, 2002, -2002, 0'
|
|
enlistar en 'candidatos'
|
|
|
|
decimales '0'
|
|
para cada elemento (v,candidatos,17)
|
|
tomar'v' ---copiar en 'm'---, quitar el signo
|
|
guardar en 'v'
|
|
|
|
#(len( c:=(string(v)) ) ), mover a 'n'
|
|
"Num: ",justificar derecha(10,#(string(m))),"(",n,")\t"
|
|
|
|
si ' #( n>=3 && not(is even(n))) '
|
|
" puede ser procesado : "
|
|
tomar si ( #(n==3), 'c', #( copy( 3, (n/2-1), c )) ), NL
|
|
sino
|
|
"no puede ser procesado\n"
|
|
fin si
|
|
luego imprime
|
|
siguiente
|
|
|
|
terminar
|