Im not sure if this will do what you want, but just make one function that returns double.
If you need to store it in an int, it will just lose the decimal. *Note that it will NOT round.
....facepalm. Yes, that will work :D
But now I'm just curious. Is this possible (actually sending different types) in any way shape or form?
You can use a template, with if-else conditions calling the specific types after the input of n.