To generate random numbers in C++, you’d typically make use of the <random> header, which was introduced in C++11, offering a wide range of facilities for generating random numbers from various distributions.
<random>
C++ offers several ways to round numbers, like floor(), ceil(), and round().
floor()
ceil()
round()
C++ has a built-in library <complex> that eases working with complex numbers.
<complex>