// test3.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "iostream"
using namespace std;

int main(int argc, char* argv[])

{
int length,i,* ptr1;
cout<<"请输入数组的长度:";
cin>>length;
ptr1=new int[length];
for(i=0;i<length;i++)
*(ptr1+i)=i*10;
for(i=0;i<length;i++)
cout<<ptr1[i]<<" ";
cout<<endl;
delete[] ptr1;
return 0;
}
2834

被折叠的 条评论
为什么被折叠?



