Computer Science, asked by shaikrihana7680, 3 months ago

C program to find the difference between the largest and smallest element of an array

Answers

Answered by nehaliganvit3
4

Explanation:

Iterative program to find the smallest and largest elements in an array

/ C program to find the smallest and largest element in an array.

int main() {

printf(“\nEnter the number of elements : “); scanf(“%d”,&n);

printf(“\nInput the array elements : “); ...

scanf(“%d”,&a[i]); ...

large=small=a[0]; ...

for(i=1;i<n;++i) ...

large=a[i];

Similar questions