Sun May 25, 2008 3:44 pm
#include<iostream.h>
int MAX(int a,int b)
{
if(a>b)
return a;
return b;
}
int MAX(int a[],int SIZE )
{
if(SIZE==1)return a[0];
return MAX(a[SIZE-1],MAX(a,SIZE-1));
}
int[] Sort(int a[],int Size)
{
int temp;
temp=a[0]
a[0]=MAX(a,Size);
}
void main()
{
int a[6]={6,5,4,3,78,7};
cout<<Sort(a,6)<<endl;
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.