TheBulgarianWolf

Advertisement Messages

Jan 3rd, 2021
959
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.02 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. namespace Advertisement_Message
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             string[] phrases = new string[] {
  11.                 "Excellent product. ",
  12.                 "Such a great product. " ,
  13.                 "I always use that product. ",
  14.                 "Best product of its category. ",
  15.                 "Exceptional product. ",
  16.                 "I can’t live without this product. "
  17.             };
  18.  
  19.             string[] events = new string[] {
  20.                 "Now I feel good. ",
  21.                 "I have succeeded with this product. ",
  22.                 "Makes miracles.I am happy of the results! ",
  23.                 "I cannot believe but now I feel awesome. ",
  24.                 "Try it yourself, I am very satisfied. ",
  25.                 "I feel great. "
  26.                
  27.             };
  28.             string[] authors = new string[] {
  29.                 "Diana - ",
  30.                 "Petya - ",
  31.                 "Stella - ",
  32.                 "Elena - ",
  33.                 "Katya - ",
  34.                 "Iva - ",
  35.                 "Annie - ",
  36.                 "Eva - ",
  37.             };
  38.             string[] cities = new string[] {
  39.                 "Burgas",
  40.                 "Sofia",
  41.                 "Plovdiv",
  42.                 "Varna",
  43.                 "Ruse",
  44.             };
  45.  
  46.             Random rand = new Random();
  47.             Console.WriteLine("Enter the number of advertisement message you want to generate: ");
  48.             int number = int.Parse(Console.ReadLine());
  49.             for(int i = 0; i < number; i++)
  50.             {
  51.                 int randomPhr = rand.Next(0, phrases.Length);
  52.                 int randomEve = rand.Next(0, events.Length);
  53.                 int randomAut = rand.Next(0, authors.Length);
  54.                 int randomCity = rand.Next(0, cities.Length);
  55.                 Console.WriteLine(phrases[randomPhr] + events[randomEve] + authors[randomAut] + cities[randomCity]);
  56.             }
  57.         }
  58.    
  59.        
  60.     }
  61. }
  62.  
Add Comment
Please, Sign In to add comment