It is my first day in labview and I need to determine if a number is even or odd.
Can someone please tell me how to do it.
Spencer
It is my first day in labview and I need to determine if a number is even or odd.
Can someone please tell me how to do it.
Spencer
Divide by 2, then compare the integer result to the floating point result. If they are equal, it’s even.
Are you having trouble figuring out how to determine if a number is even, or how to implement the algorithm in LabVIEW. Perhaps you could ask more specific problems.
To keep it integer, use the remainder and quotient block. It is similar to the mod() operation in some other languages. If N div 2 has a remainder of 0, it was even.
Greg McKaskle