Pure Programmer
Blue Matrix


Cluster Map

Project: Random Bytes

Write a program to generate a random stream of bytes. The program should accept three values on the command line: minimum byte value, maximum byte value and the number of bytes to generate. Include assertions to check that the command line min and max are in the range 0-255.

Output
$ g++ -std=c++17 RandomBytes.cpp -o RandomBytes -lfmt $ ./RandomBytes 32 126 100 A)J*QN[M+4`Lsu04[{OucV>;w{Yk(:-m[Bol G"aI<Svh;xT(nL#NDSoX,PzaFZII:M$^+BJWCnQiUN1z{}"%CQiCyEO]UP:,84c$ g++ -std=c++17 RandomBytes.cpp -o RandomBytes -lfmt $ ./RandomBytes 48 57 100 3225076181097927298912927464590584516100622643543225768000405917477161888239762970079024386890115141

Solution