#include<iostream>
#include<string>

using namespace std;

int main() 
{
	int arr[6] = {1,2,3,4,5,6};
	int i = 0;
	int j = sizeof(arr) / sizeof(int) - 1;
	
	while (i < j) {
		int temp = arr[i];
		arr[i] = arr[j];
		arr[j] = temp;
		i++;
		j--;
	}

	for (i = 0; i < 6; i++) {
		cout << arr[i] << endl;

	}
	system("pause");
	return 0;
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-03
  • 2021-08-13
  • 2022-12-23
  • 2021-11-10
  • 2022-01-23
  • 2021-08-23
相关资源
相似解决方案