Computer Science, asked by anilmallem, 2 months ago

write a c Program to print Prime numbers..​

Answers

Answered by Anonymous
2

Answer:

C program for prime number using function

int main() { int n, result; printf("Enter an integer to check whether it's prime or not.\ n"); scanf("%d",&n);

result = check_prime(n); if (result == 1) printf("%d is prime.\ n", n); else. printf("%d isn't prime.\ ...

int check_prime(int a) { int c; for (c = 2; c <= a - 1; c++) {

Similar questions