
Originally Posted by
ginarific
Hello!
I'm trying to calculate the factorial of a number, but I don't know which command to use to test if the input variable is an integer.
I tried using the isinteger command, but it returns ans = 0 when you enter both decimal values and positive integers.
Is there any other command I can use that returns true (ans = 1) for positive integer values and false (ans = 0) for non-integer values? I've been trying to look this up but I can't find it. >_>
Thank you in advance to anybody who helps!
--Gina