SHARE
TWEET

AutogeneratedAderts

NelIfandieva Feb 15th, 2020 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string[] phrases = { "Excellent product.",
  2.                 "Such a great product.",
  3.                 "I always use that product.",
  4.                 "Best product of its category.",
  5.                 "Exceptional product.",
  6.                 "I can’t live without this product."
  7.             };
  8.  
  9.             string[] events = {
  10.                 "Now I feel good.", "I have succeeded with this product.",
  11.                 "Makes miracles. I am happy of the results!",
  12.                 "I cannot believe but now I feel awesome.",
  13.                 "Try it yourself, I am very satisfied.",
  14.                 "I feel great!"
  15.             };
  16.  
  17.             string[] names = { "Diana", "Petya", "Stella", "Elena", "Katya", "Iva", "Annie", "Eva" };
  18.  
  19.             string[] towns = { "Burgas", "Sofia", "Plovdiv", "Varna", "Ruse" };
  20.  
  21.             int n = int.Parse(Console.ReadLine());
  22.  
  23.             string[] messages = new string[n];
  24.             Random random = new Random();
  25.  
  26.             for (int i = 1; i <= n; i++)
  27.             {
  28.                 int rPhrase = random.Next(0, phrases.Length);
  29.                 string phrase = phrases[rPhrase];
  30.  
  31.                 int rEvent = random.Next(0, events.Length);
  32.                 string ev = events[rEvent];
  33.  
  34.                 int rName = random.Next(0, names.Length);
  35.                 string name = names[rName];
  36.  
  37.                 int rTown = random.Next(0, towns.Length);
  38.                 string town = towns[rTown];
  39.  
  40.                 Advert advert = new Advert(phrase, ev, name, town);
  41.  
  42.                 messages[i - 1] = $"{advert.Phrase} {advert.EventS} {advert.Name} - {advert.Town}";
  43.             }
  44.  
  45.             string allMessages = string.Join("\n", messages);
  46.             Console.Write(allMessages);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top