To download NI software, including the products shown below, visit ni.com/downloads.
Demonstrates how to calculate 1001st prime number using MathScript Node.
Description
This program is to solve Project Euler Problem Number 7: By listing the first six prime numbers, what is the 10001st prime number? The example uses iteration number as the number to be computed. MathScript Node is used to determine whether the number is a prime number. The prime numbers identified is built into an array. The program stops when the prime numbers elements reach 1001. The last prime number will be displayed.
Requirements
LabVIEW 2012 (or compatible)
MathScript RT module
Steps to Implement or Execute Code
Additional Information or Resources
VI Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.