This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
i read that above topics and trying to solve those but i am finding difficulty in that and it is not getting.
i already done of generating prime numbers between 1 to 1000 but finding of twin pairs getting difficulty.
please help in that finding pair sir..
As I said elsewhere, show us what you've done. Post your code (and please use the 'code tags' to make it easier to read).
but generally, if you have found the first 1000 primes, hopefully you have them in an array. If so, all you need to do is loop through the array, and look at the i'th an i'th + 1 elements. See if the difference between them is 2 or not. If so, they are a twin pair. if not, they aren't.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Please resist the temptation to provide solutions like this.
If someone is trying to learn to be a cook, it it better to hand them a fully decorated cake, or to have them spend time in the kitchen baking and decorating it themselves, providing tips when they need/ask for it?
Hi fred rosenberger
I didn't mean to provide solution, i just rectified the error that kiran have made while writing their code in another similar thread.
well all is good now and i did solve it differently than Kiran.
Finally the problem resolved
your concept is correct but should take care about syntax error and blocks.
if you still have any problem write here.
Hello guys... Fred has said it all where are the codes?...The best way to resolve doubts -at least in java- is to see 'codes-in-action' and resolve the problem with the codes you see...We all have tons of logics in our brains to argue...Without codes you spend more time and brain energy.
In Your Pursuit Towards Certification, NEVER Give Up.
Joined: Jun 09, 2011
I didn't see the solution that Aashu Mahajan provide but noe I got the code...
Thanks guys for guiding me...