Saturday, November 22, 2008

C PROGRAM FOR LARGEST NUMBER IN AN ARRAY

LARGEST  NUMBER IN  AN ARRAY

void main()
{
int a[50],size,i,large;
clrscr();
printf("\nEnter the size of the array: ");
scanf("%d",&size);
printf("\nEnter %d elements in to the array: ”, size);
for(i=0;i
scanf("%d",&a[i]);
big=a[0];
for(i=1;i
{
if(large=a[i];
}
printf("\nBiggest: %d",large);
getch();
}

1 comment:

DIAC said...

Are you ready to join automation technologies? We offer online training you can access 24/7 from anywhere in the world.
Register now!
www.diac.co.in
Contact us: 91-9953489987, 9711287737