#include <stdio.h>
#define S 10
int main() {
    int a[S],i,n,large,small;
    printf("\nEnter how many no u want in array:");
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    large=small=a[0];
    for(i=1;i<n;i++)
    {
        if(a[i]>large)
        large=a[i];
        if(a[i]<small)
        small=a[i];
    }
    printf("\nLarge = %d & Small = %d",large,small);
    return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: