/* Weiss used 1-n as the indices of the array rather than 0 to n-1 Also, he modified the Ada version quite a bit so that it would "work" in C. In the Ada version he used "and then" to force what is called short- circuit evaluation. All C comparisons use short-circuit evaluation so the algorithm did NOT need to be changed. */ #include void shellsort(int a[], int n) { int i, j, increment; int temp; for (increment = n/2; increment > 0; increment /= 2) { for (i = increment; i < n; i++) /*changed this line*/ { temp = a[i]; j = i; while ((j>=increment)&&(temp