yana_neykovaa

Objects, Task2/Excercises / 02. Advertisement Message

Oct 20th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Advertisement_Message
  8. {
  9. public class Advertisement_Message
  10. {
  11. public static void Main()
  12. {
  13. string[] phrases = "Excellent product|Such a great product|I always use that product|Best product of its category"
  14. .Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
  15. string[] events = "Now I feel good.|I have succeeded to change.|That makes miracles.|I cannot believe but now I feel awesome.|Try it yourself, I am very satisfied."
  16. .Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
  17. string[] authors = "Diana, Petya, Stella, Elena, Katya, Iva, Annie, Misha"
  18. .Split(new char[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries);
  19. string[] cities = "Burgas, Sofia, Plovdiv, Varna, Ruse"
  20. .Split(new char[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries);
  21. Random rnd = new Random();
  22. int n = int.Parse(Console.ReadLine());
  23. for (int i = 0; i < n; i++)
  24. {
  25. Console.WriteLine("{0}. {1} {2} - {3}",
  26. phrases[rnd.Next(phrases.Length)],
  27. events[rnd.Next(events.Length)],
  28. authors[rnd.Next(authors.Length)],
  29. cities[rnd.Next(cities.Length)]);
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment