#include
#include
template
temp min(temp &n,temp a[])
{
temp i;
for(i=0;i {
cout<<"\n\nEnter "< cin>>a[i];
} temp small=a[1];
for(i=0;i {
if(a[i] small=a[i];
}
return small;
}
void main()
{
clrscr();
int a[50],s,n,i;
cout<<"Enter how many elements (max 50) : ";
cin>>n;
s=min(n,a);
cout<<"\n\nSmallest no. is -> "< getch();
}
|
No feedbacks found. Be the first to respond and make money from revenue sharing program.
|