/************************************************************** * Section : 15 * Machine No. : N * Roll No. : 19CS100XY * Name : Aritra Hazra * Assignment No : LT-1-ODD-B * Description : Print a set of same array in clock-wise manner **************************************************************/ #include #define MAX 1000 int main () { int a[MAX]; int m, n, i, j, k = 0, l = 0; /* k - starting row index m - ending row index l - starting column index n - ending column index i,j - iterator */ /* Taking the Array as User-input */ printf("Enter No. of Elements: "); scanf("%d", &n); printf("Enter %d Array Elements: ", n); for (i=0; i= l; --i) { printf("%d ", a[i]); } m--; } /* Print the first column from the remaining columns */ if (l < n) { for (i = m - 1; i >= k; --i) { printf("%d ", a[l]); } l++; } } printf("\n"); }