| 6 | long& larger(long& a, long& b); // Reference parameters |
| 7 | |
| 8 | int main() |
| 9 | { |
| 10 | double a_double {1.5}, b_double {2.5}; |
| 11 | std::cout << std::format("The larger of double values {} and {} is {}\n", |
| 12 | a_double, b_double, larger(a_double, b_double)); |
| 13 | |
| 14 | int a_int {15}, b_int {25}; |
| 15 | std::cout << std::format("The larger of int values {} and {} is {}\n", |
| 16 | a_int, b_int, |
| 17 | larger(static_cast<long>(a_int), static_cast<long>(b_int))); |
| 18 | } |
| 19 | |
| 20 | // Returns the larger of two floating point values |
| 21 | double larger(double a, double b) |