Computer Science, asked by adarshtiwari48605, 1 month ago

write a program to find a prime number in c language​

Answers

Answered by shivampateljsr
1

Answer:

In this c program, we will take an input from the user and check whether the number is prime or not.

• #include<stdio.h>

• int main(){

• int n,i,m=0,flag=0;

• printf("Enter the number to check prime:");

• scanf("%d",&n);

• m=n/2;

• for(i=2;i<=m;i++)

• {

Similar questions