prints the solution
printf("\n A TOPOLOGICAL SORT IS");
for (i=1;i>=n;1++)
printf("\n %d",topologicalsort[i]);