Problema Javascript alguien que me pueda apoyar | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Problema Javascript alguien que me pueda apoyar

Dada una matriz de dimension 3*3 identificar los valores incorrectos y remplazarlos por los correctos para tener un cuadro mágico. Entrada [ [4,9,2], [3,5,7] , [ 8,1,5] ] Salida [ [4,9,2], [3,5,7],[8,1, 6] ]

14th Feb 2020, 2:29 PM
Aldo04
17 Answers
+ 3
pues no esta perfecto pero espero que puedes traducir en javascript. esta facil python... creo que.. https://code.sololearn.com/cQ2uvYmoNMZA/?ref=app
14th Feb 2020, 4:08 PM
Oma Falk
Oma Falk - avatar
+ 3
postet si un otro sololearner puede traducir en javascript
14th Feb 2020, 4:18 PM
Oma Falk
Oma Falk - avatar
14th Feb 2020, 4:32 PM
Oma Falk
Oma Falk - avatar
+ 3
✨ Hassan Awsm ✨ you could copy the question and translate it using Google translate. It is not necessary for everyone to know English if you know.
16th Feb 2020, 6:18 AM
Tanmay Gupta
Tanmay Gupta - avatar
+ 1
solo puedo en python te gusta?
14th Feb 2020, 3:30 PM
Oma Falk
Oma Falk - avatar
+ 1
si tanto en la suma de filas deber ser igual a 15, columnas igual a 15 diagonales igual a 15.
14th Feb 2020, 4:46 PM
Aldo04
+ 1
Tanmay Gupta thanks bro I appreciate that!!!
16th Feb 2020, 6:59 AM
hassan👨🏼‍💻
hassan👨🏼‍💻 - avatar
0
hablas Ingles?
14th Feb 2020, 2:51 PM
Oma Falk
Oma Falk - avatar
0
No, pero sin problema lo traduzco amigo
14th Feb 2020, 2:52 PM
Aldo04
0
muy bien from 1 follow the following sequence: right down right down up ... and from the beginning if you leave the square... enter again on the opposite side. it should lead you through 1 2 3,4,.... if not.... that's the error.
14th Feb 2020, 2:58 PM
Oma Falk
Oma Falk - avatar
0
Si sugun Solo es necesario cambiar la posición [2,2] el 5 por el 6 y tendremos nuestro cuadrado mágico. Estoy iterando con un forEach. [ [4,9,2], [3,5,7] , [ 8,1,5] ] [ [4,9,2], [3,5,7], [8,1, 6] ] Pero no logro poder cambiar ese dato del array
14th Feb 2020, 3:06 PM
Aldo04
0
si 492 357 815 1 esta en [2,1]. rightdown 2 esta en[2+1,1+1]=[0,2] rightdown 3 esta en [0+1,2+1]=[1,0] up 4 esta en [1-1,0] =[0, 0] rightdown 5 esta en [0+1,0+1]=[1,1] rightdown 6 esta en [1+1,1+1]=[2,2] nooooooo error [2,2] remplazar 5 con 6!!! up 7 esta en [2-1,2]= [1.2] rightdown 8 esta en [1+1,2+1]= [2,0] rightdown 9 esta en [2+1,0+1]=[0,1]
14th Feb 2020, 3:18 PM
Oma Falk
Oma Falk - avatar
0
Me podrias apoyar con un poco de codigo, si eres tan amable.
14th Feb 2020, 3:28 PM
Aldo04
0
Claro aunque no entienda muy bien ese lenguaje, soy nuevo en esto de la programación disculpa.
14th Feb 2020, 4:04 PM
Aldo04
0
Vale muchisimas gracias amigo, are el intento.Saludos
14th Feb 2020, 4:11 PM
Aldo04
0
plz what
14th Feb 2020, 10:32 PM
DRA701
DRA701 - avatar
0
Didn't get your question I know english only sorry!
16th Feb 2020, 2:23 AM
hassan👨🏼‍💻
hassan👨🏼‍💻 - avatar