#include<iostream.h>
#include<conio.h>
int maximum(int n,int w[]);
void main()
{
clrscr();
int b[10],n,max;
cout<<"ENTER HOW MANY ELEMENTS ";
cin>>n;
cout<<"ENTER VALUES ";
for(int i=0;i<n;i++)
cin>>b[i];
max=maximum(n,b);
cout<<"MAXIMUM IS "<<max;
getch();
}
int maximum(int n,int w[])
{
int max=w[0];
for(int i=0;i<n-1;i++)
if(w[i+1]>max)
max=w[i+1];
return max;
}
#include<conio.h>
int maximum(int n,int w[]);
void main()
{
clrscr();
int b[10],n,max;
cout<<"ENTER HOW MANY ELEMENTS ";
cin>>n;
cout<<"ENTER VALUES ";
for(int i=0;i<n;i++)
cin>>b[i];
max=maximum(n,b);
cout<<"MAXIMUM IS "<<max;
getch();
}
int maximum(int n,int w[])
{
int max=w[0];
for(int i=0;i<n-1;i++)
if(w[i+1]>max)
max=w[i+1];
return max;
}