03-14-2019 01:20 PM
HI,
I want to add to every element of the array with every iteration of the for-loop. I have attached the program that I have created. Whenever I run the program I get the output as an array with every element in it having value '0'. How do I solve this problem?
03-14-2019 01:39 PM
You need to initialize your array.
You are not getting an array where every value is zero like you say you are. You are actually getting an empty array.
Your shift register is initialized with an empty array.
When you multiply an empty array by i, you get an empty array. When you add an array to an empty array, you get an empty array.
Move your array control outside the loop, multiply it by zero, and connect that to the shift register. Now you'll have an array to start that is filled with zeroes and is the same size as your array control.