Advertisement
Spocoman

01. Advertisement Message

Mar 2nd, 2022
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.27 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. namespace AdvertisementMessage
  5. {
  6.     class Message
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             List<string> phrases = new List<string>() { "Excellent product.", "Such a great product.", "I always use that product.", "Best product of its category.", "Exceptional product.", "I can’t live without this product." };
  11.             List<string> events = new List<string>() { "Now I feel good.", "I have succeeded with this product.", "Makes miracles. I am happy of the results!", "I cannot believe but now I feel awesome.", "Try it yourself, I am very satisfied.", "I feel great!" };
  12.             List<string> authors = new List<string>() { "Diana", "Petya", "Stella", "Elena", "Katya", "Iva", "Annie", "Eva" };
  13.             List<string> cities = new List<string>() { "Burgas", "Sofia", "Plovdiv", "Varna", "Ruse" };
  14.  
  15.             int messageNumbers = int.Parse(Console.ReadLine());
  16.  
  17.             Random num = new Random();
  18.  
  19.             for (int i = 0; i < messageNumbers; i++)
  20.             {
  21.                 Console.WriteLine($"{phrases[num.Next(0, phrases.Count)]} {events[num.Next(0, events.Count)]} {authors[num.Next(0, authors.Count)]} {cities[num.Next(0, cities.Count)]}.");
  22.             }
  23.         }
  24.     }
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement