The ratio_equal() is an inbuilt function in C++ STL that checks if two given ratios are equal or not.
template < class ratio1_name, class ratio2_name > ratio_equal
Template Parameters: The function accepts two template parameters ratio1 and ratio2 which are to be compared.
Return value: The function returns true if the ratios are equal otherwise it returns false.
Below programs illustrate the ratio_equal() function:
Both ratio are equal
Both ratio are not equal
Rated as one of the most sought after skills in the industry, own the basics of coding with our C++ STL Course and master the very concepts by intense problem-solving.