Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <algorithm>
- using namespace std;
- int main( ) {
- int d;
- cout<<"Enter nunber of elements: ";
- cin>>d;
- vector <int> myVector(d);
- int res=0;
- int mx=0;
- for(unsigned int i=0;i<d;i++){
- cin>>res;
- mx=max(mx,res );
- }
- cout<<endl;
- cout<<mx;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement