#include int checkIfPrime(int x); long factorial(int x); int main() { //int low=0,high=0; int number = 0; printf("Enter the number:"); scanf("%d",&number); int n = number,i = number-1; while(i > 1) { if(number % i == 0 ) { printf("( %d %d ) ",i,checkIfPrime(i)); } i--; } printf("\n"); return 0; } int checkIfPrime(int x) { if( ( factorial(x-1) + 1) % x == 0) return 1; else return 0; } long factorial(int x) { long fact = 1; int i =1; for( i = 1; i<= x ; i++) { fact = fact * i; } return fact; }