C++ Program to Check whether a number is a Prime number or not.

A Prime no is a whole number that is greater than 1 and only divisible by 1 and itself. 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29 are the first few prime numbers. Today I will show you how to write a program to check whether a number is a Prime number or not.Let’s see the code… C++ Program to Check whether a number is a Prime number or not.

Output:

Read more

C++ Program to Print Fibonacci Series

Series in the form of 0,1,1,2,3,5,8,13,21…….. is called the Fibonacci Series. To find this kind of series we add two previous digits to get the next one. Here is the logic to generate Fibonacci Series. next=first+second; first=second; second=next; That’s it….. C++ Program to Print Fibonacci Series

Output:

Read more