#include <xtd/console>
#include <xtd/random>
auto main() -> int {
rand.next_bytes(bytes);
console::write_line("Five random byte values:");
for (auto byte_value : bytes)
console::write("{, 5}", byte_value);
console::write_line();
console::write_line("Five random integer values:");
for (auto ctr = 0; ctr <= 4; ctr++)
console::write("{, 15}", rand.next());
console::write_line();
console::write_line("Five random integers between 0 and 100:");
for (auto ctr = 0; ctr <= 4; ctr++)
console::write("{, 10}", rand.next(101));
console::write_line();
console::write_line("Five random integers between 50 and 100:");
for (auto ctr = 0; ctr <= 4; ctr++)
console::write("{, 10}", rand.next(50, 101));
console::write_line();
console::write_line("Five Doubles:");
for (auto ctr = 0; ctr <= 4; ctr++)
console::write("{, 10}", rand.next_double());
console::write_line();
console::write_line("Five Doubles between 0 and 5:");
for (auto ctr = 0; ctr <= 4; ctr++)
console::write("{, 10}", rand.next_double() * 5);
console::write_line();
}
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.hpp:71
Represents a pseudo-random number generator, a device that produces a sequence of numbers that meet c...
Definition random.hpp:40
The xtd::collections::generic namespace contains interfaces and classes that define generic collectio...
Definition comparer.hpp:15
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10