C program to determine if a number is prime or not

C program to determine if a number is prime or not

#include <stdio.h>
#include <stdbool.h>

int main(){
	
	int index, input;
	
	bool isPrime = true;
	
	// prompt the user to enter a number
	printf("Enter an integer: ");
	
	// get the input
	scanf("%d\n", &input);
	
	
	if(input == 1){
		isPrime = false;
	}
	else{
		for(index = 2; index < input/2; index++){
			
			if((input % index) == 0){
			isPrime = false;
			}
		}
	}
	
	if (isPrime) printf("%d is prime number.", input);
	else printf("%d is not a prime number.", input);
	
	return 0;
	
}