//max of an array
#include <stdio.h>
int main() {
int n,i,max;
printf("Enter size of array : \n");
scanf("%d",&n);
int a[n];
printf("Entered elements of array : ");
for(i=0;i<n;i++){
scanf("%d",&a[i]);
printf("%d ",a[i]);
}
max=a[0];
for(i=0;i<n;i++){
if (max<a[i]){
max=a[i];
}
}
printf("\nMax : %d",max);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: