# Como puedo mostrar en la consola números aleatorios definidos (-1,50,100,200) con Random

**URL:** <https://discourse.processing.org/t/como-puedo-mostrar-en-la-consola-numeros-aleatorios-definidos-1-50-100-200-con-random/30676>\
**Category:** Español\
**Created:** [June 13, 2021, 1:51pm UTC](https://discourse.processing.org/t/como-puedo-mostrar-en-la-consola-numeros-aleatorios-definidos-1-50-100-200-con-random/30676 "2021-06-13T13:51:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [June 13, 2021, 4:03pm UTC](https://discourse.processing.org/t/como-puedo-mostrar-en-la-consola-numeros-aleatorios-definidos-1-50-100-200-con-random/30676/2 "2021-06-13T16:03:14Z")

</div>

Hello,

Please format your code:  
_[Preguntas Frecuentes (FAQ/Guidelines)](https://discourse.processing.org/t/preguntas-frecuentes-faq-guidelines/19943)_

Create an array:  
`int [] array = {1, 3, 10, 17, 21};`

Select a random element from the array:  
`int index = int(random(5));`

Use `println()` to print to console.

See the Keyboard section in references for other options:

- [Language Reference (API) \ Processing 3+](https://processing.org/reference/)

References:

- [random() \ Language (API) \ Processing 3+](https://processing.org/reference/random_.html)

`:)`

---

_[View the full topic](https://discourse.processing.org/t/como-puedo-mostrar-en-la-consola-numeros-aleatorios-definidos-1-50-100-200-con-random/30676)._
