Me ayudan a crear este algoritmo? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Me ayudan a crear este algoritmo?

Lea 2 números (N1 y N2). Si alguno de los 2 números es igual a 0, escriba un mensaje indicando que los números deben ser diferentes de cero y volver a solicitar los 2 números hasta que cumplan con la condición. En caso que los 2 números sean iguales, deberá sumarlos y almacenar el resultado en una variable (R). Si el primer número es mayor que el segundo, deberá restar el N2-N1 y almacenarlo en R, pero si el primer número es menor que el segundo deberá multiplicar N1*N2. Al final deberá escribir un mensaje indicando cuál operación realizó y cuál fue el resultado.

4th Apr 2020, 6:28 PM
junior Masterpro
junior Masterpro - avatar
3 Answers
+ 1
Try to write the code first and then post the code with a specific question about where you are having trouble.
4th Apr 2020, 8:35 PM
Brian
Brian - avatar
+ 1
SoloLearn discourages asking others to solve homework problems. It is here to help you learn, but not to do the work for you.
4th Apr 2020, 8:47 PM
Brian
Brian - avatar
0
I don't understand what you want to tell me
4th Apr 2020, 8:39 PM
junior Masterpro
junior Masterpro - avatar