Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.74 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.Specialized;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Net;
  7. using System.Threading;
  8.  
  9. namespace IMJunior
  10. {
  11.     class Program
  12.     {
  13.  
  14.         static void Main(string[] args)
  15.         {
  16.  
  17.             Dialog[] dialog = new Dialog[3]
  18.             {
  19.                 new Dialog("Who are you", new string[] { "Footballer", "Nord", "Thief"}),
  20.                 new Dialog("What would you like?", new string[] { "Win my rocrastination", "Have bitcoin", "By GTX1080(fucking miner!!!)"}),
  21.                 new Dialog("You can help for orden", new string[] { "Yep. I'm Ronaldo", "I'm a gay", "I'm a geek"})
  22.             };
  23.             Console.WriteLine("Please fill this anket");
  24.  
  25.  
  26.             //А дальше чёт хз чё делать, тут явно нужно вкорячить цикл. Но чёт я устал или тупой.
  27.             int[] Array = { 10, 10, 52, 23 };
  28.  
  29.             foreach(int element in Array)
  30.             {
  31.                 Console.WriteLine(element);
  32.             }
  33.  
  34.             foreach (Dialog d in dialog)
  35.             {
  36.  
  37.                 Console.WriteLine(d.Qustion);
  38.                 for (int i = 0; i < d.Answer.Length; i++)
  39.                 {
  40.                     Console.WriteLine("[{0}]>{1}", i, d.Answer[i]);
  41.                 }
  42.                 Console.ReadLine();
  43.                 d.isDoorOpen = true;
  44.             }
  45.         }
  46.     }
  47.  
  48.     class Dialog
  49.     {
  50.  
  51.         public bool isDoorOpen;
  52.         public string Qustion;
  53.         public string[] Answer;
  54.  
  55.         public Dialog(string Qustion, string[] Answer)
  56.         {
  57.             this.Qustion = Qustion;
  58.             this.Answer = Answer;
  59.         }
  60.     }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement