Guest User

Untitled

a guest
Dec 26th, 2011
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. #include<iostream>
  2. #include<string>
  3. #include<vector>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. int poljebrojeva[9];
  10. int index;
  11. int brojevi;
  12. int novopoljebrojeva[8];
  13. vector <int> novivectorbrojeva;
  14. vector <int> vectorpoljabrojeva;
  15. cout << "upisi index" << endl;
  16. cin >> index;
  17. cout << "ae" << endl;
  18.  
  19. for ( int i = 0;i < 10; i++)
  20.   {
  21.     cin >> brojevi;
  22.     vectorpoljabrojeva.push_back(brojevi);
  23.   }
  24.  
  25.  
  26. for ( int i = 0;i < 9; i++)
  27.   {
  28.     if ( i != index)
  29.     {
  30.     novivectorbrojeva.push_back(vectorpoljabrojeva[i]);
  31.     }
  32.   }
  33.  
  34. for ( int i = 0;i < 9; i++)
  35.   {
  36.     cout << novivectorbrojeva[i]<< endl;
  37.   }
  38.  
  39. return 0;
  40.  
  41.  
  42.      
  43.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment