I\'m writing a program that will calculate factorials of integers. However, the part I\'m stuck on is if someone enters a non-integer such as 1.3, I\'d like to
assert(isnumeric(input) && round(input) == input, 'That number is not an integer.')
You could add other checks, (like for positivity) easily as well.
Edited using isinteger. Thanks @SolarStatistics, I hadn't noticed they added this functionality.
Edited back to original answer again as isinteger isn't appropriate (see comments below).