![]() |
Even and odd
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 |
Re: Even and odd
Divide by 2, then compare the integer result to the floating point result. If they are equal, it's even.
|
Re: Even and odd
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.
|
Re: Even and odd
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 |
| All times are GMT -5. The time now is 10:05. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi