Wednesday, September 17, 2008

find LARGEST NUMBER IN AN ARRAY using C program

void main()
{
  int a[50],size,i,big;
  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(big
            big=a[i];
  }
  printf("\nBiggest: %d",big);
  getch();
}

No comments:

Post a Comment

Thanks to given comments.......

My Blog List