write('PROGRAMA CLASIFICACION DE ESTRELLAS, Desea empezar? (S/N):'),read(Z),conclusion(0,Z). pregunta(X):-X=2,write(salir del programa). pregunta(X):-X=3,write('LA CLASE ESPECTRAL ES A?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=4,write('LA MAGNITUD ES -7?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=5,write('LA DISTANCIA ES 880?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=6,write('LA DISTANCIA ES 1630?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=7,write('NO HAY UNA ESTRELLA CON ESA CARACTERISTICA'),read(Z),conclusion(X,Z). pregunta(X):-X=8,write('La estrella con clase espectral A, magnitud -7 y distancia 1630 es DENEB'),read(Z),conclusion(X,Z). pregunta(X):-X=9,write('NO HAY MAS DISTANCIAS PARA MAGNITUD -7 DE LA CLASE ESPECTRAL A, DESEA MIRAR OTRA MAGNITUD? (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=10,write('LA MAGNITUD ES 1?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=11,write('LA DISTANCIA ES 8.8?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=12,write('LA DISTANCIA ES 26?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=13,write('LA DISTANCIA ES 35?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=14,write('La estrella con clase espectral A, magnitud 1 y distancia 8.8 es SIRIUS'),read(Z),conclusion(X,Z). pregunta(X):-X=15,write('La estrella con clase espectral A, magnitud 2 y distancia 16 es VEGA'),read(Z),conclusion(X,Z). pregunta(X):-X=16,write('NO HAY UNA ESTRELLA CON ESA CARACTERISTICA'),read(Z),conclusion(X,Z). pregunta(X):-X=17,write('NO HAY MAS DISTANCIAS PARA MAGNITUD 1 DE LA CLASE ESPECTRAL A, DESEA MIRAR OTRA MAGNITUD? (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=18,write('LA MAGNITUD ES 2?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=19,write('LA DISTANCIA ES 16?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=20,write('NO HAY MAS MAGNITUDES DE LA CLASE ESPECTRAL A, DESEA MIRAR OTRA CLASE ESPECTRAL? (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=21,write('LA CLASE ESPECTRAL ES B?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=22,write('La estrella con clase espectral A, magnitud 2 y distancia 16 es ALTAIR'),read(Z),conclusion(X,Z). pregunta(X):-X=23,write('NO HAY MAS DISTANCIAS PARA LA CLASE ESPECTRAL A, DESEA MIRAR OTRA CLASE ESPECTRAL? (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=24,write('LA MAGNITUD ES -7?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=25,write('LA DISTANCIA ES 880?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=26,write('La estrella con clase espectral B, magnitud -7 y distancia 880 es RIGEL'),read(Z),conclusion(X,Z). pregunta(X):-X=27,write('LA DISTANCIA ES 1630?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=28,write('NO HAY UNA ESTRELLA CON ESA CARACTERISTICA'),read(Z),conclusion(X,Z). pregunta(X):-X=29,write('NO HAY MAS DISTANCIAS PARA MAGNITUD -7 DE LA CLASE ESPECTRAL B, DESEA MIRAR OTRA MAGNITUD? (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=30,write('LA MAGNITUD ES -3?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=31,write('LA DISTANCIA ES 98?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=32,write('NO HAY UNA ESTRELLA CON ESA CARACTERISTICA'),read(Z),conclusion(X,Z). pregunta(X):-X=33,write('LA DISTANCIA ES 300?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=34,write('La estrella con clase espectral A, magnitud -7 y distancia 1630 es SPICA'),read(Z),conclusion(X,Z). pregunta(X):-X=35,write('NO HAY MAS DISTANCIAS PARA MAGNITUD -3 DE LA CLASE ESPECTRAL B, DESEA MIRAR OTRA MAGNITUD? (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=36,write('LA CLASE ESPECTRAL ES F?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=37,write('LA MAGNITUD ES -3?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=38,write('LA DISTANCIA ES 98?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=39,write('La estrella con clase espectral F, magnitud -3 y distancia 98 es CANOPUS'),read(Z),conclusion(X,Z). pregunta(X):-X=40,write('LA DISTANCIA ES 300?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=41,write('NO HAY UNA ESTRELLA CON ESA CARACTERISTICA'),read(Z),conclusion(X,Z). pregunta(X):-X=42,write('NO HAY MAS DISTANCIAS PARA MAGNITUD -3 DE LA CLASE ESPECTRAL F, DESEA MIRAR OTRA MAGNITUD? (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=43,write('LA MAGNITUD ES 3?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=44,write('LA DISTANCIA ES 11?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=45,write('La estrella con clase espectral F, magnitud 3 y distancia 11 es PROCYON'),read(Z),conclusion(X,Z). pregunta(X):-X=46,write('NO HAY MAS DISTANCIAS PARA MAGNITUD 3 DE LA CLASE ESPECTRAL F, DESEA MIRAR OTRA MAGNITUD? (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=47,write('NO HAY MAS MAGNITUDES DE LA CLASE ESPECTRAL F, DESEA MIRAR OTRA CLASE ESPECTRAL? (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=48,write('LA CLASE ESPECTRAL ES G?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=49,write('LA MAGNITUD ES -1?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=50,write('LA DISTANCIA ES 46?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=51,write('La estrella con clase espectral G, magnitud -1 y distancia 46 es CAPELLA'),read(Z),conclusion(X,Z). pregunta(X):-X=52,write('LA DISTANCIA ES 68?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=53,write('NO HAY UNA ESTRELLA CON ESA CARACTERISTICA'),read(Z),conclusion(X,Z). pregunta(X):-X=54,write('NO HAY MAS DISTANCIAS PARA MAGNITUD -1 DE LA CLASE ESPECTRAL G, DESEA MIRAR OTRA MAGNITUD? (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=55,write('NO HAY MAS MAGNITUDES DE LA CLASE ESPECTRAL G, DESEA MIRAR OTRA CLASE ESPECTRAL? (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=56,write('LA CLASE ESPECTRAL ES K?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=57,write('LA MAGNITUD ES -1?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=58,write('LA DISTANCIA ES 46?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=59,write('NO HAY UNA ESTRELLA CON ESA CARACTERISTICA'),read(Z),conclusion(X,Z). pregunta(X):-X=60,write('LA DISTANCIA ES 68?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=61,write('La estrella con clase espectral K, magnitud -1 y distancia 68 es ALDEBARAM'),read(Z),conclusion(X,Z). pregunta(X):-X=62,write('NO HAY MAS DISTANCIAS PARA MAGNITUD -1 DE LA CLASE ESPECTRAL K, DESEA MIRAR OTRA MAGNITUD? (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=63,write('LA MAGNITUD ES 0?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=64,write('LA DISTANCIA ES 36?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=65,write('La estrella con clase espectral K, magnitud 0 y distancia 36 es ARTURUS'),read(Z),conclusion(X,Z). pregunta(X):-X=66,write('NO HAY MAS DISTANCIAS PARA MAGNITUD 0 DE LA CLASE ESPECTRAL K, DESEA MIRAR OTRA MAGNITUD? (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=67,write('LA MAGNITUD ES 1?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=68,write('LA DISTANCIA ES 8.8?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=69,write('NO HAY UNA ESTRELLA CON ESA CARACTERISTICA'),read(Z),conclusion(X,Z). pregunta(X):-X=70,write('LA DISTANCIA ES 26?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=71,write('NO HAY UNA ESTRELLA CON ESA CARACTERISTICA'),read(Z),conclusion(X,Z). pregunta(X):-X=72,write('LA DISTANCIA ES 35?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=73,write('La estrella con clase espectral K, magnitud 1 y distancia 35 es POLLUX'),read(Z),conclusion(X,Z). pregunta(X):-X=74,write('NO HAY MAS DISTANCIAS PARA MAGNITUD 0 DE LA CLASE ESPECTRAL K, DESEA MIRAR OTRA MAGNITUD? (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=75,write('NO HAY MAS MAGNITUDES DE LA CLASE ESPECTRAL K, DESEA MIRAR OTRA CLASE ESPECTRAL? (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=76,write('LA CLASE ESPECTRAL ES M?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=77,write('LA MAGNITUD ES -5?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=78,write('LA DISTANCIA ES 490?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=79,write('La estrella con clase espectral K, magnitud -5 y distancia 490 es BETELGEUSE'),read(Z),conclusion(X,Z). pregunta(X):-X=80,write('NO HAY MAS DISTANCIAS PARA MAGNITUD -5 DE LA CLASE ESPECTRAL M, DESEA MIRAR OTRA MAGNITUD? (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=81,write('LA MAGNITUD ES -4?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=82,write('LA DISTANCIA ES 250?, (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=83,write('La estrella con clase espectral M, magnitud -4 y distancia 250 es ANTARES'),read(Z),conclusion(X,Z). pregunta(X):-X=84,write('NO HAY MAS DISTANCIAS PARA MAGNITUD -4 DE LA CLASE ESPECTRAL M, DESEA MIRAR OTRA MAGNITUD? (S/N):'),read(Z),conclusion(X,Z). pregunta(X):-X=85,write('NO HAY MAS MAGNITUDES DE LA CLASE ESPECTRAL M, SI DESEA VUELVA A COMENZAR.'),read(Z),conclusion(X,Z). pregunta(X):-X=86,write('NO HAY MAS CLASES ESPECTRALES, SI DESEA VUELVA A COMENZAR.'),read(Z),conclusion(X,Z). conclusion(X,Z):-X=0,Z='s',pregunta(3). conclusion(X,Z):-X=0,Z='n',pregunta(2). conclusion(X,Z):-X=3,Z='s',pregunta(4). conclusion(X,Z):-X=3,Z='n',pregunta(21). conclusion(X,Z):-X=4,Z='s',pregunta(5). conclusion(X,Z):-X=4,Z='n',pregunta(10). conclusion(X,Z):-X=5,Z='s',pregunta(7). conclusion(X,Z):-X=5,Z='n',pregunta(6). conclusion(X,Z):-X=6,Z='s',pregunta(8). conclusion(X,Z):-X=6,Z='n',pregunta(9). conclusion(X,Z):-X=9,Z='s',pregunta(10). conclusion(X,Z):-X=9,Z='n',pregunta(2). conclusion(X,Z):-X=10,Z='s',pregunta(11). conclusion(X,Z):-X=10,Z='n',pregunta(18). conclusion(X,Z):-X=11,Z='s',pregunta(14). conclusion(X,Z):-X=11,Z='n',pregunta(12). conclusion(X,Z):-X=12,Z='s',pregunta(15). conclusion(X,Z):-X=12,Z='n',pregunta(13). conclusion(X,Z):-X=13,Z='s',pregunta(16). conclusion(X,Z):-X=13,Z='n',pregunta(17). conclusion(X,Z):-X=17,Z='s',pregunta(18). conclusion(X,Z):-X=17,Z='n',pregunta(2). conclusion(X,Z):-X=18,Z='s',pregunta(19). conclusion(X,Z):-X=18,Z='n',pregunta(20). conclusion(X,Z):-X=19,Z='s',pregunta(22). conclusion(X,Z):-X=19,Z='n',pregunta(23). conclusion(X,Z):-X=20,Z='s',pregunta(21). conclusion(X,Z):-X=20,Z='n',pregunta(2). conclusion(X,Z):-X=21,Z='s',pregunta(24). conclusion(X,Z):-X=21,Z='n',pregunta(36). conclusion(X,Z):-X=23,Z='s',pregunta(21). conclusion(X,Z):-X=23,Z='n',pregunta(2). conclusion(X,Z):-X=24,Z='s',pregunta(25). conclusion(X,Z):-X=24,Z='n',pregunta(2). conclusion(X,Z):-X=25,Z='s',pregunta(26). conclusion(X,Z):-X=25,Z='n',pregunta(27). conclusion(X,Z):-X=27,Z='s',pregunta(28). conclusion(X,Z):-X=27,Z='n',pregunta(29). conclusion(X,Z):-X=29,Z='s',pregunta(30). conclusion(X,Z):-X=29,Z='n',pregunta(2). conclusion(X,Z):-X=30,Z='s',pregunta(31). conclusion(X,Z):-X=30,Z='n',pregunta(2). conclusion(X,Z):-X=31,Z='s',pregunta(32). conclusion(X,Z):-X=31,Z='n',pregunta(33). conclusion(X,Z):-X=33,Z='s',pregunta(34). conclusion(X,Z):-X=33,Z='n',pregunta(35). conclusion(X,Z):-X=35,Z='s',pregunta(36). conclusion(X,Z):-X=35,Z='n',pregunta(2). conclusion(X,Z):-X=36,Z='s',pregunta(37). conclusion(X,Z):-X=36,Z='n',pregunta(48). conclusion(X,Z):-X=37,Z='s',pregunta(38). conclusion(X,Z):-X=37,Z='n',pregunta(40). conclusion(X,Z):-X=38,Z='s',pregunta(39). conclusion(X,Z):-X=38,Z='n',pregunta(40). conclusion(X,Z):-X=40,Z='s',pregunta(41). conclusion(X,Z):-X=40,Z='n',pregunta(42) conclusion(X,Z):-X=42,Z='s',pregunta(43). conclusion(X,Z):-X=42,Z='n',pregunta(2). conclusion(X,Z):-X=43,Z='s',pregunta(44). conclusion(X,Z):-X=43,Z='n',pregunta(47). conclusion(X,Z):-X=44,Z='s',pregunta(45). conclusion(X,Z):-X=44,Z='n',pregunta(46). conclusion(X,Z):-X=46,Z='s',pregunta(48). conclusion(X,Z):-X=46,Z='n',pregunta(2). conclusion(X,Z):-X=47,Z='s',pregunta(48). conclusion(X,Z):-X=47,Z='n',pregunta(2). conclusion(X,Z):-X=48,Z='s',pregunta(49). conclusion(X,Z):-X=48,Z='n',pregunta(56). conclusion(X,Z):-X=49,Z='s',pregunta(50). conclusion(X,Z):-X=49,Z='n',pregunta(55). conclusion(X,Z):-X=50,Z='s',pregunta(51). conclusion(X,Z):-X=50,Z='n',pregunta(52). conclusion(X,Z):-X=52,Z='s',pregunta(53). conclusion(X,Z):-X=52,Z='n',pregunta(54). conclusion(X,Z):-X=54,Z='s',pregunta(56). conclusion(X,Z):-X=54,Z='n',pregunta(2). conclusion(X,Z):-X=55,Z='s',pregunta(56). conclusion(X,Z):-X=55,Z='n',pregunta(2). conclusion(X,Z):-X=56,Z='s',pregunta(57). conclusion(X,Z):-X=56,Z='n',pregunta(76). conclusion(X,Z):-X=57,Z='s',pregunta(58). conclusion(X,Z):-X=57,Z='n',pregunta(63). conclusion(X,Z):-X=58,Z='s',pregunta(59). conclusion(X,Z):-X=58,Z='n',pregunta(60). conclusion(X,Z):-X=60,Z='s',pregunta(61). conclusion(X,Z):-X=60,Z='n',pregunta(62). conclusion(X,Z):-X=62,Z='s',pregunta(63). conclusion(X,Z):-X=62,Z='n',pregunta(2). conclusion(X,Z):-X=63,Z='s',pregunta(64). conclusion(X,Z):-X=63,Z='n',pregunta(67). conclusion(X,Z):-X=64,Z='s',pregunta(65). conclusion(X,Z):-X=64,Z='n',pregunta(66). conclusion(X,Z):-X=66,Z='s',pregunta(67). conclusion(X,Z):-X=66,Z='n',pregunta(2). conclusion(X,Z):-X=67,Z='s',pregunta(68). conclusion(X,Z):-X=67,Z='n',pregunta(75). conclusion(X,Z):-X=68,Z='s',pregunta(69). conclusion(X,Z):-X=68,Z='n',pregunta(70). conclusion(X,Z):-X=70,Z='s',pregunta(71). conclusion(X,Z):-X=70,Z='n',pregunta(72). conclusion(X,Z):-X=72,Z='s',pregunta(73). conclusion(X,Z):-X=72,Z='n',pregunta(74). conclusion(X,Z):-X=74,Z='s',pregunta(76). conclusion(X,Z):-X=74,Z='n',pregunta(2). conclusion(X,Z):-X=75,Z='s',pregunta(76). conclusion(X,Z):-X=75,Z='n',pregunta(2). conclusion(X,Z):-X=76,Z='s',pregunta(77). conclusion(X,Z):-X=76,Z='n',pregunta(86). conclusion(X,Z):-X=77,Z='s',pregunta(78). conclusion(X,Z):-X=77,Z='n',pregunta(81). conclusion(X,Z):-X=78,Z='s',pregunta(79). conclusion(X,Z):-X=78,Z='n',pregunta(80). conclusion(X,Z):-X=80,Z='s',pregunta(81). conclusion(X,Z):-X=80,Z='n',pregunta(2). conclusion(X,Z):-X=81,Z='s',pregunta(82). conclusion(X,Z):-X=81,Z='n',pregunta(85). conclusion(X,Z):-X=82,Z='s',pregunta(83). conclusion(X,Z):-X=82,Z='n',pregunta(84).