Advertisement
Kali_prasad

life and everything

Mar 9th, 2022
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include<iostream>
  2. #include<vector>
  3. using namespace std;
  4. int main()
  5. {
  6.     vector<int> v;
  7.     int temp;
  8.     do{
  9.        
  10.        cin>>temp;
  11.        v.push_back(temp);
  12.     }while(temp!=42&&(temp%100)==temp);
  13.     v.pop_back();
  14.     //sort(v.begin(),v.end());
  15.     for(auto x:v)
  16.     {
  17.         cout<<x<<endl
  18.     }
  19.    
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement