# Program to find prime number (C++) – Basic C++ Programming

## Program to find prime number in C++

**-Program:**

#include <stdio.h>

#include <conio.h>

void main()

{

int n, i;

clrscr();

printf(“Enter number:”);

scanf(“%d”, &n);

`for(i = 2; i <= n / 2; ++i)`

{

if(n % i == 0)

printf ("Prime number");

` }`

getch();

}

**-Output:**

Program to find square and cube of a number

“My posts/articles/images are not allowed to be stolen/copied anywhere at Cyber space. Doing so will allow me to take a legal action against the copier.”

Tags: c program to find digit prime number,

program to find prime divisors of a number,

program to find prime number,

program to find prime number between 1 and 100 in c,

program to find prime number c++,

program to find prime number in array,

program to find prime number in assembly language,

program to find prime number in c,

program to find prime number in c language,

program to find prime number in c with explanation,

program to find prime number in c++ using class,

program to find prime number in c++ using while loop,

program to find prime number in cobol,

program to find prime number in java,

program to find prime number using for loop in c,

program to find prime number using function,

program to find prime number using function in c++,

program to find prime number using recursion,

program to find prime numbers,

program to find prime numbers between a given range in java,

program to find prime numbers from 1 to 100 in c,

program to find prime numbers in a given range,

program to find prime numbers in asp.net,

program to find prime numbers in c# using for loop,

program to find prime numbers in java,

program to find prime numbers in python,

program to find prime numbers upto n,

write a program to find prime number using default argument in constructor
**M.Bakhtiar Zuberi**

I’m M.Bakhtiar Zuberi, the owner of 3DPixelz.com and its network websites. I’ve been web-developing & graphics-designing for the past 7 years, since the age of 11. I like to work with PHP/HTML and Photoshop/Illustrator. Part-time developer of ZCL and ETC cryptocurrencies. I love to blog here and write for Tribune in my free time.