Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
627
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Globalization;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace ObjectsExercises
  9. {
  10. class Program
  11. {
  12.  
  13.  
  14. static void Main(string[] args)
  15. {
  16.  
  17. int number = int.Parse(Console.ReadLine());
  18.  
  19. string[] Phrases = new string[] { "Now I feel good.",
  20. "I have succeeded with this product.",
  21. "Makes miracles. I am happy of the results!",
  22. "I cannot believe but now I feel awesome.",
  23. "Try it yourself, I am very satisfied.",
  24. "I feel great!"};
  25.  
  26. string[] Events = new string[] { "Now I feel good.",
  27. "I have succeeded with this product.",
  28. "Makes miracles. I am happy of the results!",
  29. "I cannot believe but now I feel awesome.",
  30. "Try it yourself, I am very satisfied.",
  31. "I feel great!" };
  32.  
  33. string[] Authors = new string[] { "Diana", "Petya", "Stella", "Elena", "Katya", "Iva", "Annie", "Eva" };
  34.  
  35. string[] Cities = new string[] { "Burgas", "Sofia", "Plovdiv", "Varna", "Ruse" };
  36.  
  37. Random num = new Random();
  38.  
  39.  
  40.  
  41.  
  42.  
  43. for (int i = 0; i < number; i++)
  44. {
  45.  
  46. int PhraseIndex = num.Next(0, Phrases.Length);
  47. int EventIndex = num.Next(0, Events.Length);
  48. int AuthorIndex = num.Next(0, Authors.Length);
  49. int CityIndex = num.Next(0, Cities.Length);
  50.  
  51.  
  52. Console.WriteLine(Phrases[PhraseIndex] + " " + Events[EventIndex] + " " + Authors[AuthorIndex] + " - " + Cities[CityIndex]);
  53. }
  54.  
  55. }
  56. }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement