Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- void minim(short *&v,short &n)
- {
- short i,min=*v;
- for (i=1;i<=n;i++,v++)
- if (min>*v) min=*v;
- cout<<min;
- }
- int _tmain(int argc, _TCHAR* argv[])
- {
- short i,n;
- cin>>n;
- short *v= new short[n*sizeof(short)];
- for (i=1;i<=n;i++,v++)
- {
- cin>>*v;
- };
- v--;
- minim(v,n);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement