#include <stdio.h> int main(void) { int num, i, is_prime; printf("Enter a number: "); scanf("%d", &num); is_prime = 1; for(i = 2; i <= num / 2; i = i + 1) if((num%i)==0) is_prime = 0; if(is_prime==1) printf(" is prime."); else printf("not prime."); return 0; }