#include <stdio.h>

int main() {
    int arr[20];
    int i,N,large,small; 
    printf("enter size of an array\n");
    scanf("%d\n",&N);
    printf("enter %d elements in array:",N);
    for(i=1;i<=N;i++)
    {
        scanf("%d",&arr[i]);
    }
    small=arr[i];
    printf("\n elements in array are:\n");
    for(i=2;i<=N;i++)
    {
        if(large<arr[i])
        large=arr[i];
    }
    printf("largest is %d\n",large);
    return 0;
}

Embed on website

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