int N = 5, A[N], i;
for(i = 0; i < N; i++){
printf("Enter A[%d]\n", i);
scanf("%d", &A[i]);
}
printf("\nNumber of element\tValue\n");
for(i = 0; i < N; i++){
printf("A[%d]\t\t\t%d\n", i, A[i]);
}
int min = A[0], max = A[0];
for(i = 0; i < N; i++){
if(A[i] < min) min = A[i];
if(A[i] > max) max = A[i];
}
printf("min = %d\nmax = %d");
#include <stdio.h>
void main() {
int N = 5, A[N], i;
for(i = 0; i < N; i++){
printf("Enter A[%d]\n", i);
scanf("%d", &A[i]);
}
printf("\nNumber of element\tValue\n");
for(i = 0; i < N; i++){
printf("A[%d]\t\t\t%d\n", i, A[i]);
}
int min = A[0], max = A[0];
for(i = 0; i < N; i++){
if(A[i] < min) min = A[i];
if(A[i] > max) max = A[i];
}
printf("min = %d\nmax = %d\n", min, max);
}