p0stalDude3,
To assist with your problem, more information is needed: The definition of a prime number is not in your solution algorithm or your coding. A prime number is a number greater than 0 that is divisible by 1 and itself, such as 1,2, 3, 5, 7, 11, 13, 17,19, etc. In your code you are not testing for prime numbers. It is not clear from your code as to what to do with the prime number when you find it, that is to say do you display the prime, build a list (data structure), or place the prime number into a data structure like an array. Instead of stacking you for loop, first lay it out, step by step first. Hint: I would use the While-repetition control (While nValues <50, because the incrementing the loop is at the bottom of the loop and not at the top of the loop .
Hope ths helps.
__________________
Disclaimer: The above comments are solely the opinion of one person and not to be construed as a directive or an incentive to commit fraudulent acts.
|