Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 70145

LabView: Calculate sum of positive integers

$
0
0

Hello guys, im trying to do the follow problem "Write a program that asks the user to enter a positive integer n, and calculates the sum of the integers 2 + 4 + 6 + … + 2n and show the results to the screen. Hints: please check the validity of the positive integer n, what if user input a negative number?" Im new to labview and i attached my work. Can anyone tell me if my program is correct if not can you tell me how to fix it. Or if theres a better way to do it.


Viewing all articles
Browse latest Browse all 70145

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>