I tried quite a bit to solve this problem and I can't find the solution for the odd ones. It doesn't take my last term. I need some help.
Create a * .vi for calculating the sum of the first N even numbers and the product of first N odd numbers.
Here is what I get. The EVEN sum is good, but cant figure it out how to get the correct odd product.
Solved! Go to Solution.
What is "Numeric" supposed to represent? A max number? Number of elements to process?
If you see my photo, numeric is N. For N=5 we will have first 5 numbers. Sum of even is 0+2+4=6, product of odd should be 1*3*5=15. If I have N=7 sum of even 0+2+4+6=12 product should be 1*3*5*7=105.
I think numeric Q&R by 2 before the for loop is wrong. floor(2/2) = 1 and floor(3/2) = 1, so you will not get different results for numeric = 2 and numeric =3.