DEV Community

Sushant Bajracharya
Sushant Bajracharya

Posted on

2

Generate n digit random number in elixir

To generate n digit of random number you can do

Enum.random(10,20)

It will generate 2 digit number between 10 and 20

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay