Preview:
#include <stdio.h>
#include <stdlib.h>
void findMaximum();

int main() 
{
    int arr[10];
    for(int i=0;i<=9;i++)
    {
        printf("enter element %d: ",(i+1));
        scanf("%d",&arr[i]);
    }
    
    findMaximum(arr,10);

    return 0;
}
void findMaximum(int arr[],int n)
{
    int max=arr[0];
    for(int i=1;i<n;i++)
    {
        if(arr[i]>max)
        max=arr[i];
    }
    printf("the max value is %d: \n",max);
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter