LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

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
(326 Views)
Highlighted
Solution
Accepted by topic author niks9792
03-13-2019 10:19 PM

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
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

Message 2 of 3
(303 Views)
Solution
Accepted by topic author niks9792
03-13-2019 10:19 PM

@GerdW wrote:

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


Uneven.png

Message 3 of 3
(278 Views)