Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
ejercicio 9 feb
objeto :- write('{'),aux1, write('}'). aux1 :- read(X), (X='atributo'->atributo,aux2; X='fin'->write('')). atributo :- cadena,write(':'),valor. aux2 :- read(X), (X='atributo'->write(', '),atributo,aux2; X='fin'->write('')). valor :- read(X), (X='numero'->numero; X='cadena'->cadena; X='objeto'->objeto; X='arreglo'->arreglo; write(error),write(X)). numero :- read(X),write(X). cadena :- read(X),write('"'),write(X),write('"'). arreglo :- write('['),aux3,write(']'). aux3 :- read(X), (X='valor'->valor,aux4; X='fin'->write('')). aux4 :- read(X), (X='valor'->write(', '),valor,aux4; X='fin'->write('')). :- objeto.
run
|
edit
|
history
|
help
0
Extra. Pinales Escalona Eduardo Salvador
Flores Abundes Javier Eduardo
tarea por punto extra
Guzman_Goiz_if_anidado
Arreglos
Salgado Sanchez Ivan_Examen2
Agrupación Bayes
codificador
Programa de Arrays
Alcala Ornelas Carlos Alberto