Maker Pro
Maker Pro

microprocessor 8086 HELP

hello guys.. i want a program which find the prime numbers from 1 to N
(N is given from keyboard) and result shown in the monitor.. please
help me..
 
C

Charles

Jan 1, 1970
0
hello guys.. i want a program which find the prime numbers from 1 to N
(N is given from keyboard) and result shown in the monitor.. please
help me..

IT'S Homework (you have to do it on your own) ... I can't do it either.
 
J

Jon Kirwan

Jan 1, 1970
0
hello guys.. i want a program which find the prime numbers from 1 to N
(N is given from keyboard) and result shown in the monitor.. please
help me..

Look up prime number _sieve_. That should help, though you don't need
to go that far. Also, google will hand a version to you on a silver
platter. You don't need us. And if you already know what a prime
number is and you have even the most basic rudiments of programming
down, it isn't hard to write a short routine. Honestly, it's very,
very easy.

What class are you taking?

Jon
 
E

Eeyore

Jan 1, 1970
0
hello guys.. i want a program which find the prime numbers from 1 to N
(N is given from keyboard) and result shown in the monitor.. please
help me..

We don't usually do your homework problems here.

WTF do you mean by a 'microprocessor 8086' anyway ? Does anyone still use
those ? Microprocessors don't have keyborards and monitors, those are
computers and I can't even recal when an 8086 was last used in a serious
one, way back in the 1980s somewhere.

Looks like you shouldn't have been asleep in class.

Graham
 
Look up prime number _sieve_.  That should help, though you don't need
to go that far.  Also, google will hand a version to you on a silver
platter.  You don't need us.  And if you already know what a prime
number is and you have even the most basic rudiments of programming
down, it isn't hard to write a short routine.  Honestly, it's very,
very easy.

What class are you taking?

Jon


Also good reading:
http://www.ams.org/notices/199612/pomerance.pdf

Michael
 
J

Jasen Betts

Jan 1, 1970
0
hello guys.. i want a program which find the prime numbers from 1 to N
(N is given from keyboard) and result shown in the monitor.. please
help me..

I've done this before (I used turboC)

http://en.wikipedia.org/wiki/Eratosthenes'_Sieve

just need to do it piecewise

hint: there's no point in packing 8 cells into a byte when it costs so much
to addresse the individual bytes.
 
Top