C program to find biggest number from array
Program in the C programming language to find the biggest element or number from the array of any size. Below is the code of the C program -
/* C program to find the biggest element or no. from the array */
#include<stdio.h>
#include<conio.h>
void main()
{
int ar[100],big,i,n;
printf("Enter the size of the array to input the elements \n");
scanf("%d",&n);
printf("Enter the elements of the array \n");
for(i=0;i<n;i++)
{
scanf("%d",&ar[i]);
}
big=ar[0];
for(i=0;i<n;i++)
{
if(ar[i]>=big)
{
big=ar[i];
}
}
printf("Largest number of the array is %d",big);
getch();
}
No comments yet