6,129
社区成员
发帖
与我相关
我的任务
分享
class Program
{
static void Main(string[] args)
{
Console.Write("请输入n:");
int n = Convert.ToInt32(Console.ReadLine());
List<Point> list = new List<Point>();
for (int i = 0; i < n; i++)
{
list.Add(new Point(i,i+1,i+2));
}
}
}
public class Point
{
public int x { get; set; }
public int y { get; set; }
public int z { get; set; }
public Point(int x, int y,int z)
{
this.x = x;
this.y = y;
this.z = z;
}
}