Vector-Sort

  • + 0 comments

    int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */
    vectorv;

     int n;
     cin>>n;
     for(int i=0;i<n;i++) {
         int ele;
         cin>>ele;
         v.push_back(ele);
     }
    
     sort(v.begin(),v.end());
    
     for(int a : v) {
         cout<<a<<" ";
     }
    
    return 0;
    

    }