Graficando números en consola III (7-9) [ESP-ENG] | C++

Portadas para los post de programación.jpg

¡Saludos! Acá les traigo la parte final de esta serie "Graficando números en consola". Ahora con el 7,8 y 9, al final del post están los links a las entregas anteriores.

Para empezar, como en las anteriores entregas, les dejo un ejemplo de uno de los números que se mostrarán en pantalla. Este ejemplo refleja el número 7, y las condiciones implicadas. La primera es "i0" es decir , siempre que el eje de los verticales sea 0, grafica. Continuamos con "jn-i" Es decir, cada que en el eje de las verticales se cumpla n-i, el tamaño ingresado menos el valor del eje de las i, dando como resultado una línea inclinada, perfecta para reflejar este número.

Finalmente coloqué un detalle en el lado derecho, que si bien no era totalmente necesario, ayuda a que sea más estético.

Dicho detalle parte de la condición "j==0" y "i<(n/2)-1), es decir, cuando en los horizontales sea 0 y en los verticales se mantenga menor al tamaño ingresado entre 2 menos 1.

Para el ocho partimos de las condiciones explicadas para graficar un 0 en la primera publicación de esta serie pero añadimos una línea a la mitad, es decir cuando "i==n/2" añadí a ello "j<n" pero esto puede ser omitido pues con la condición anterior basta.

Greetings! Here I bring you the final part of this series "Graphing numbers in console". Now with the 7,8 and 9, at the end of the post are the links to the previous installments.

To begin with, as in the previous installments, I leave you an example of one of the numbers that will be displayed on the screen. This example reflects the number 7, and the conditions involved. The first is "i0" i.e., as long as the vertical axis is 0, plot. We continue with "jn-i" i.e., whenever the axis of the verticals is n-i, the size entered minus the value of the i-axis, resulting in a slanted line, perfect for reflecting this number.

Finally I placed a detail on the right side, that although it was not totally necessary, it helps to make it more aesthetic.

This detail starts from the condition "j==0" and "i<(n/2)-1), that is, when in the horizontals it is 0 and in the verticals it remains smaller than the size entered between 2 minus 1.

For the eight we start from the conditions explained to plot a 0 in the first publication of this series but we add a line in the middle, that is to say when "i==n/2" I added to it "j<n" but this can be omitted because with the previous condition is enough.

image.png

image.png

image.png

Programación c++.png


Para el 9 partimos de las condiciones usadas en el 0 y en el 8 (in/2), pero cambiamos la condición que considera cuando j0 para que también tome en cuenta i<n/2. Acá les dejo dos maneras para mostrar el nueve (con condiciones distintas), una más sencilla que la otra. Mi idea es mostrar que hay más de una forma de lograrlo y que de hecho puedes mejorar tu código conforme practicas.

For 9 we start from the conditions used in 0 and 8 (in/2), but we change the condition that considers when j0 so that it also takes into account i<n/2. Here are two ways to display nine (with different conditions), one simpler than the other. My idea is to show that there is more than one way to do it and that you can actually improve your code as you practice.

image.png

image.png

image.png

Programación c++.png

image.png

image.png

image.png

¡Y bueno... Eso es todo por hoy! Espero que haya sido de ayuda esta serie de tres post con la cual al fin llegué a 20 posts referentes a programación, para apoyo de estudiantes universitarios, autodidactas o quizás gente con experiencia que quiera refrescar algún conocimiento pues a todos nos sucede en algún momento que olvidamos algún detalle y necesitamos tomar los cuadernos otra vez.

Si te interesa otro tutorial de programación acá te dejo los links a los que he realizado hasta ahora:

And well... That's all for today! I hope this series of three posts has been of help, with which I finally reached 20 posts about programming, for the support of university students, self-taught or perhaps people with experience who want to refresh some knowledge because it happens to all of us at some point that we forget some detail and we need to take the notebooks again.

If you are interested in another programming tutorial here are the links to the ones I have done until now:


Nombre de la publicación / Name of the postLINK
Calculador de datos para un triángulo rectángulo en C++1
Concecionario de autos, ejercicio en JAVA2
Calculador de edad básico C++3
Inversor de números de tres cifras4
¿Cuántos números de 3 cifras existen cuya suma sea 10? - ¡Respondiendo a otro usuario! C++6
Calculadora simple, cifra menos significativa y portada simple C++7
¡Vistazo a BeatUDO! [ESP-ENG] JAVA9
Comprobar si un número de dos cifras es primo C++10
Conversor de pulgadas a 7 unidades distintas C++11
Comprobar si un número es capicúa (Máx 5 cifras) C++12
Comprobador de caracteres C++13
Calculadora de índice de masa corporal C++14
Calculadora de factoriales C++15
Conversor (Grados Celsius - Fahrenheit - Kelvin) C++16
Calculadora de longitud, diametro y área de una circunferencia C++17
Graficando números en consola (0-3) C++18
Graficando números en consola II (4-6) C++19

Programación c++.png

Puedes seguirme por acá si lo deseas:
You can follow me here if you want:

Diseño sin título.gif

Cuenta secundaria
(Dibujos, edición y juegos) | Secondary account (Drawings, editing and games)

H2
H3
H4
3 columns
2 columns
1 column
1 Comment
Ecency