Friday, August 19, 2011

Program to find the Largest element of the Array.

//Program to find the Largest element of the Array.
#include<stdio.h>
#include<conio.h>
void main()
{
 int a[10],i,l=0;
 clrscr();
 printf(" enter the values of elements");
 for(i=0;i<10;i++)
 {
   scanf("%d",&a[i]);
 }
 for(i=0;i<10;i++)
 {
  if(a[i]>l)
  {
   l=a[i];
  }
 }
 printf("\n largest values of array %d",l);
 getch();
}

Previous Next Home
0 Comments
Comments

Leave a Comment

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Twitter Delicious Facebook Favorites More