拉莫斯之舞
代码如下:1234567891011121314151617181920212223242526#include <iostream> using namespace std; int main(){ int n; cout << "请输入数组元素个数"; cin >> n; // 建立数组 int *arr = new int[n]; // 赋值 for (int i = 0; i < n; i++) arr[i] = i; // 输出 for (int i = 0; i < n; i++) cout << arr[i] << " ";}