-5

I would like to know how l can overload a function named void maximum to find the maximum of two integer or two double numbers. When passing one integer and one double number function it should print that double vs int or int vs double. And in this case comparisons are not allowed and user should not be asked for input.?

1 Answers1

0

I suggest you subtract one number from another, then check the sign of the result i.e. is it positive, negative or zero, and based on this determine which was larger.

nitronoid
  • 1,459
  • 11
  • 26