Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
2.Examen
objeto :- write('{'),aux1, write('}'). aux1 :- read(X),(X='atributo'->atributo; X='fin'->write('')). atributo :-cadena, write(':'),valor,aux2. arreglo :- write('['),aux3, write(']'). aux2 :- read(X),(X='atributo'->write(','),atributo; X='fin'->write('')). aux3 :- read(X),(X='valor'->valor,aux4; X='fin'->write('')). aux4 :- read(X),(X='valor'->write(','),valor,aux4; X='fin'->write('')). cadena :- read(X),write('"'),write(X),write('"'). numero :- read(X),write(X). valor :-read(T),(T='cadena'->cadena; T='numero'->numero; T='arreglo'->arreglo; T='metodo'->metodo; T='objeto'->objeto). metodo :- write('"function() {'),instruccion,write('return isan}"'). instruccion :-read(I),(I='asignacion'->asignacion,instruccion; I='decision'->decision,instruccion; I='fin'->write('')). asignacion :- numero,write('='),numero,write(';'). decision :- write('if ('),condicion,write('){'),instruccion,write('}'). condicion :- numero. :- objeto.
run
|
edit
|
history
|
help
0
Gonzalez Diaz Jobana
Arboles de decisión estructurada (if anidados)-Guerrero Hernandez Angel
tarea 1-1
aaa
tarea resuelta 3nm70 2 marzo if anidado
fCube Prover
Salgado Sanchez Ivan_Examen1
Medina Paredes José Esteban
BD.3
Sánchez López Fernando Gabriel - JSON arrays