Selection sort in c : Is following c code is written according to selection sort algorithm? I'm little bit confused about it. However, it gives correct results.

        #include<stdio.h>
    int main()
    {
    	int n;
    	printf("Enter size of array: ");
    	scanf("%d",&n);
	    int a[n],i=0,j,min;
    	while(i<n)
    	{
	    	printf("Enter no. %d:",i+1);
    		scanf("%d",&a[i]);
	    	i++;
    	}
    	for(i=0;i<n;i++)
	    {
     		for(j=i,min=a[i];j<n;j++)
    		{
    			if(a[j]<min)
    			   min=a[j];
    			else
    			   continue;
	    		a[j]=a[i];
	    	    a[i]=min;   
    		}
    	}
    	for(i=0;i<n;i++)
    		printf("%d ",a[i]);
    	return 0;
    }

>

