Hi all,
I wrote a program for sorting a set of numbers but it not working.Please check.
Code:#include <stdio.h> #include <conio.h> int main() {long int count1,count2,copy,a[5]; clrscr(); scanf("%ld", &a[5]); count1=1; for(count1=1,count2=2;count2<=5;count1++,count2++) {a[count1]=copy; if(a[count1]>a[count2]) {a[count1]=a[count2]; a[count2]=copy;}} printf("%ld", a[5]); getch(); return 0;}