Question: Write a LABVIEW VI (program) that 1) gets a user-input integer, and 2) adds up the even numbers between 0 and that integer. For example,
Write a LABVIEW VI (program) that
1) gets a user-input integer, and
2) adds up the even numbers between 0 and that integer.
For example, if the user inputs 8, the program returns 20 (=2+4+6+8). If the user inputs 13, the program returns 42 (=2+4+6+8+10+12).
You should use some sort of loop in your answer.
Hint: you may find the Divide, Multiply, and Round Toward Infinity icons (found in the Numeric submenu of the Functions Palette) to be useful.
Remember that loops in LabVIEW run from 0 to n-1, not 1 to n.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
