Asked by
AL MaMun (4 Golds)
Friday, 31 Jul 2020, 04:11 PM
at (Education
Tutorials)
|
|
|
|
C program to input and display a C array. #include<stdio.h> int main() { int arr[100], i, n, j; printf("Enter N\n"); scanf("%d", &n); printf("Enter numbers in the array: \n"); for(i=0; i<n; i++) { scanf("%d", &arr[i]); } for(j=0; j<n; j++) { for(i=j+1; i<n; i++) { printf("{%d,%d},", arr[j], arr[i]); } } return 0; } |