Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static Random rand = new Random();
- static void Main(string[] args)
- {
- //látnivalók száma
- int numberOfSpectacles = rand.Next(50, 101);
- Console.WriteLine("We create " + numberOfSpectacles + " spectacles.");
- Spectacle[] sp = new Spectacle[numberOfSpectacles];
- for (int i = 0; i < sp.Length; i++)
- {
- sp[i] = new Spectacle();
- Console.WriteLine(sp[i].display());
- }
- //beolvasunk egy kezdőpontot
- Console.WriteLine("We create a track of spectacles that are close(<5)\n to a given starting point.");
- Console.Write("Give a starting point x,y: ");
- string s = Console.ReadLine().Trim();
- int startx = int.Parse(s.Substring(0, s.IndexOf(',')));
- int starty = int.Parse(s.Substring(s.IndexOf(',') + 1));
- //útvonal létrehozása
- Track tr = new Track(startx, starty, sp);
- Console.WriteLine(tr.display());
- Console.WriteLine("\nThe end.");
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement