VOOZH about

URL: https://www.geeksforgeeks.org/cpp/stduniform_real_distribution-max-method-in-c-with-examples/

⇱ std::uniform_real_distribution max() method in C++ with Examples - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

std::uniform_real_distribution max() method in C++ with Examples

Last Updated : 12 Jul, 2025
The max() method of uniform_real_distribution class in C++ is used to get the maximum possible value that can be generated by this uniform_real_distribution. Syntax:
result_type max() const;
Parameters: This method do not accepts any parameters. Return Value: This method return the maximum possibly generated value in this uniform_real_distribution. Example:
Output:
Max value that can be generated by this uniform_real_distribution: 20.5
Reference: https://cplusplus.com/reference/random/uniform_real_distribution/max/
Comment
Article Tags: