PROGRAM-24


//Program of maximum digit in array
#include
#include
void main()
{
  clrscr();
  int i,a[30],n,max;
  printf("Enter the number of array: ");
  scanf("%d", &n);
  for(i=0;i
  {
    printf("Enter the array = ");
    scanf("%d", &a[i]);
  }
   for(i=0;i
  {
   printf("a[%d] = %d,", i,a[i]);
   }
  max=a[0];
  for(i=1;i<=n-1;i++)
 {
   if(a[i]>max)
  {
   max=a[i];
  }
 }
  printf("\nmax = %d\n", max);
  getch();
}


Algorithm

·                     Start
·                     Declare i, a[30], n, max as integer
·                     Write("the number of array")
·                     Read(“the number of array”)
·                     for(i=0;i
·                     Write("the array ")
·                     Read(“a[i]”)
·                     for(i=0;i
·                     Read(“ i, a[i]”)
·                     max=a[0]
·                     for(i=1;i<=n-1;i++)
·                     if(a[i]>max)
·                     max=a[i]
·                     Read(“the maximum array”)
·                     Stop

#vpsinghrajput

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

1 comments: