OOCP4-1

//BCA Support //www.bcasupport.xyz #include <iostream.h> #include <conio.h> template <class t> t max(t arr[]) { int i,maxno=arr[i]; for(i=0;i<10;i++) { if(maxno<arr[i]) maxno=arr[i]; } return maxno; } int main() { clrscr(); int i=0,array[10]; cout<<"\nEnter 10 numbers :\n"; while(i<10) cin>>array[i++]; cout<<"\nMaximum no. : "<<max(array); getch(); return 0; }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.