LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Build Array

Thanks everyone. If you guys don't mind, can we stick to the while and case structure scope for now. The VI is

still not working.

 

It seems the false case, is also outputing its value.

 

 

22453iFBAA74334807D64F

0 Kudos
Message 11 of 21
(5,300 Views)

You switched the constant going to quotient and remainder to 0 instead of 20.

--
Tim Elsey
Certified LabVIEW Architect
Message 12 of 21
(5,296 Views)

Take a closer look at your Quotient and Remainder function.

 

Edit: Is there an echo in here?

Message 13 of 21
(5,294 Views)

Of course, this works fasterSmiley Happy

( finding all factors of an integer)

22455i09E03DFA932CE76E


"Should be" isn't "Is" -Jay
Message 14 of 21
(5,288 Views)

22461i3713199F0B97B9FB

 

1 less iteration required since we know 1 and Numeric are factors we can skip that iteration and test 2 through

Floor (SQRT(ABS(Numeric)))


"Should be" isn't "Is" -Jay
Message 15 of 21
(5,262 Views)

Thanks for the interesting challange- I went a step further to add this in my reuse code and added tests for perfection, primacy and squareness.  The special case handling (Number = 0 or 1) made it fun to test!

 

Enjoy!


"Should be" isn't "Is" -Jay
0 Kudos
Message 16 of 21
(5,239 Views)

I must be getting senile...

 

Did I miss something along the way?

 

I though the original OP mentionned the following:

"I expect the results:

0

1

2

4

5

10"

 

How can these be factorials?

Factorials would be:

 

0, 1, 2, 6, 24, etc.

not

0,1,2,4,5,10..

 

Yes, it's Friday and I probably missed something somewhere...

0 Kudos
Message 17 of 21
(5,200 Views)

Factors, not factorials.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 18 of 21
(5,194 Views)

 


@jcarmody wrote:

Factors, not factorials.


Right.  But this doesn't explain why he was expecting 0.  Seemed to be that he wasn't actually expecting it, since he never balked at any of our solutions.

 

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 19 of 21
(5,191 Views)

 


@elset191 wrote:

 


@jcarmody wrote:

Factors, not factorials.


Right.  But this doesn't explain why he was expecting 0.  Seemed to be that he wasn't actually expecting it, since he never balked at any of our solutions.

 


<<<<<Mind reading>>>>>  is better than reading posts (sometimes)  Don't you wish every thread explained the end use requirement as well as this one did?

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 20 of 21
(5,177 Views)