Kindly let me know Code for (a) Checking whether a number is a prime number or not, (b) to generate the first 10 prime numbers, (c) finding HCF of 3 numbers in C++ and a programme to print the first n number in the fibonacii series.

An early reply from members and techgurus are requested, pl.

Re: Code for checking prime number or not 80 80

Kindly read the announcements before asking for someone to google for you.
http://www.daniweb.com/forums/announcement8-2.html

Re: Code for checking prime number or not 80 80

There are lots of algorithms for finding prime numbers. The simplest and most crude would be to check every odd number up to 1/2 of the number.It works fine as long as you don't particularly care about performance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.