LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to find whether a number in an array is odd or even

Solved!
Go to solution

Hi,

 

      This might a simple problem. But I'm not able to crack the issue. Any helps would be appreciated. I have got an array which produces 0 to 'n'(which we will enter. I want to check each number for odd or even and that output should be connected to a case selector( case structure or if loop). If it is true I've one connection else another. I tried quotient and remainder, but it's showing the output of the first value only. Please help me out

0 Kudos
Message 1 of 3
(2,756 Views)
Solution
Accepted by topic author niks9792

Hi niks,

 

what about learning to OBEY DATAFLOW? What about autoindexing tunnels? What about polymorphism? What about using (auto)cleanup?

 

check.png

(You may also AND with 1 to get the state of the LSB…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,733 Views)
Solution
Accepted by topic author niks9792

@GerdW wrote:

(You may also AND with 1 to get the state of the LSB…)


Uneven.png

Message 3 of 3
(2,708 Views)