Function that receives a float, and return an int or a float in C

Viewed 64

I was wondering if it is possible to make a function in C, that receives a float. If it has only zero after the "." then that float is converted to an int, and returns the int to the main, otherwise, it will just stay as a float and return to the main.

0 Answers
Related