1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. typedef int* IntPtr;
  6.  
  7. int main() {
  8.  
  9. int team_size(0), player_removed(0);
  10.  
  11. cout << "How many players are on the team: ";
  12. cin >> team_size;
  13.  
  14. IntPtr team;
  15. team = new int[team_size];
  16.  
  17. cout << "What player do you want to remove (cause he sucks): ";
  18. cin >> player_removed;
  19.  
  20. cout << "Enter Values: "; //For ease, just put in 1-10
  21.  
  22. //Gets the player ID of the players
  23. for(int j = 1; j <= team_size; j++) {
  24. cin >> team[j];
  25. }
  26.  
  27. //Outputs the original array
  28. for(int k = 1; k <= team_size; k++) {
  29. cout << team[k] << ' ';
  30. }
  31.  
  32. //Bumps each player down, based on where the user requested the removed player be
  33. for(int l = player_removed; l <= team_size; l++) {
  34. team[l] = team[l+1];
  35. }
  36.  
  37. cout << endl;
  38. team_size = team_size - 1; //Since we're only removing 1 player, we can take 1 from the size of the team
  39.  
  40. //Outputs the new array, with the player removed gone
  41. for(int m = 1; m <= team_size; m++) {
  42. cout << team[m] << ' ';
  43. }
  44.  
  45.  
  46.  
  47. }
  48.