assembly language programming (prime number)

Posted by chris on Stack Overflow See other posts from Stack Overflow or by chris
Published on 2010-04-23T20:45:53Z Indexed on 2010/04/23 20:53 UTC
Read the original article Hit count: 346

Filed under:
|
|

Prompt the user for a positive three digit number, then read it. Let's call it N.

Divide into N all integer values from 2 to (N/2)+1 and test to see if the division was even, in which case N is instantly shown to be non-prime. Output a message printing N and saying that it is not prime.

If none of those integer values divide evenly (remainder never is zero), then N is shown to be prime. Output a message printing N and saying that it is prime.

Ask the user if he or she wants to test another number; if the user types "n" or "N", quit. If "y" or "Y", jump back and repeat.

Comments in your code are essential.


Hi. I am kinda in rush to do this.. please help me doing it. I'll be much appreciated. thank you

© Stack Overflow or respective owner

Related posts about assembly

Related posts about primes