//this is a program to find the largest element from the given array
#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],large,i=0;
printf("\n\nAccepting the elements of arrays");
for(i=0;i<10;i++)
{
printf("\n\nEnter Any Number: ");
scanf("%d",&a[i]);
}
large=a[0];
for(i=0;i<10;i++)
{
if(large<a[i])
large=a[i];
}
printf("\n\nLargest Element=%d",large);
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],large,i=0;
printf("\n\nAccepting the elements of arrays");
for(i=0;i<10;i++)
{
printf("\n\nEnter Any Number: ");
scanf("%d",&a[i]);
}
large=a[0];
for(i=0;i<10;i++)
{
if(large<a[i])
large=a[i];
}
printf("\n\nLargest Element=%d",large);
getch();
}