24. Write a program to check whether the given number is prime or not.
#include<stdio.h> ( this applies in the given code )
#include
int main() {
int num, i;
scanf(“%d”, &num);
for (i = 2; i * i <= num; i++) if (num % i == 0) { printf("Not Prime\n"); return 0; }
printf("Prime\n");
return 0;
}