using System;
using System.Collections;
namespace Point3D
{
class Program
{
struct Point3D
{
double x, y z;
}
static void Main(string[] args)
{
bool exit = false;
ArrayList list = new ArrayList();
Point3D points = new Point3D();
string answer;
do
{
Console.WriteLine("1. Add data for one point");
Console.WriteLine("2. Display all the entered points");
Console.WriteLine("x. Display all the entered points");
Console.WriteLine();
Console.Write("Enter a option: ");
answer = Console.ReadLine();
if (answer.ToLower() == "x")
{
exit = true;
}
else if (answer == "1")
{
Console.Write("Point x: ");
list.Add(Convert.ToInt32(Console.ReadLine()));
Console.Write("Point y: ");
list.Add(Convert.ToInt32(Console.ReadLine()));
Console.Write("Point z: ");
list.Add(Convert.ToInt32(Console.ReadLine()));
}
}
while (!exit);
}
}
}