Sunday, 7 December 2014

#include<iostream.h>
#include<conio.h>
void main()
{
 int a[100],p,s,i,n;
 clrscr();
 cout<<"\nenter size of an array:";
 cin>>n;
 s=a[0];
 p=0;
 cout<<"\nenter the arrray:";
 for(i=1;i<n;i++)
 cin>>a[i];

 for(i=1;i<n;i++)
 {
  if(a[i]>s)
  {
   s=a[i];
   p=i;
  }
 }
 cout<<"big="<<s;
 cout<<"position"<<p;
 getch();
}