/******************************************************************* * Section : 15 * Machine No. : N * Roll No. : 19CS100XY * Name : Aritra Hazra * Assignment No : LT-1-EVEN-B * Description : Print a set of same array in AntiClock-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 */ // initialize the count int cnt = 0; // total number of elements in the set of arrays int total; /* Taking the Array as User-input */ printf("Enter No. of Elements: "); scanf("%d", &n); printf("Enter %d Array Elements: ", n); for (i=0; i= k; --i) { printf("%d ", a[n - 1]); cnt++; } n--; } if (cnt == total) break; // Print the first row from the remaining rows if (l < n) { for (i = n - 1; i >= l; --i) { printf("%d ", a[i]); cnt++; } k++; } } printf("\n"); }