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..
- posted
14 years ago
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
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
Also good reading:
Michael
I've done this before (I used turboC)
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.
that'll scare him off!
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.