#include
#include
int rec(int[],int);
void main()
{
int a[15],n,min,i;
clrscr();
cout<<"Enter the size of array"; cin>>n;
cout<<"Enter the element of array"; for(i=0;i
}
min=rec(a,n);
cout<<"Minimum number is = "<
}
int rec(int a[],int n)
{
int min;
if(n==1)
{
return(a[0]);
}
else
{
min=rec(a,n-1);
if(min {
return(min);
}
else
{
return(a[n-1]);
}
}
}
No comments:
Post a Comment