New Member FAQ | Forums | Earn Revenue


Resources Entrance Ask Experts Exam Papers Jobs English Projects Universities Colleges Courses Schools Training My India



My Profile
Active Members
TodayLast 7 Days more...



Awards & Gifts
Online Exams

Fresher Jobs


Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi

Resources


Find educational articles, blogs, discussion threads and other resources.

Colleges


Find details about any college in India or search for courses.

website counter



PROGRAM TO FIND SMMALEST NO. FROM AN ARRAY USING TEMPLATE FUNCTION.


Posted Date:     Total Responses: 0    Posted By: Piyush   Member Level: Bronze   Points/Cash: 2   


#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();

}


Project Feedbacks


No feedbacks found. Be the first to respond and make money from revenue sharing program.

Post Feedback
You must Sign In to post a feedback.
Next Project: PROGRAM TO FIND THE ROOTS OF EQ. ax^2 + bx + c = 0 .
Previous Project: color palette

Return to Project Index

Post New Project


Related Projects



Advertise Here





Contact Us   Advertise   Editors    Privacy Policy    Terms Of Use   

ISC Technologies.
2006 - 2009 All Rights Reserved.