Find the prime numbers up to n

A number is called as prime number if the number is divisible by 1 and by itself.This program accepts number n as input.Here i is considered as divisor and it starts dividing the number n with the initial value as 2.If the function prime returns 1 then the given number n is prime number else it is odd number.

#include < stdio.h >
#include < conio.h > 

int prime(int n);

void main()
{
	int n,i;
	clrscr();
	printf("\nEnter n:");
	scanf("%d",&n);
	printf("\n Prime numbers up to %d are \n",n);
	for(i=1;i < n;i++)
	{
		if(prime(i)==1)
			printf("%5d",i);
	}
}
	
int prime(int n)
{//return 1 if n number is prime else 0
		int i;
		for(i=2;i < n/2;i++)
		{
			if(n%i==0)
			return (0);
		}
		return(1);
}