Advertisement
YavorJS

Advertisement Message

Sep 9th, 2016
705
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Diagnostics;
  4. using System.Globalization;
  5. using System.Linq;
  6. using System.Net;
  7. using System.Numerics;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10.  
  11.  
  12. namespace Objects_and_Classes
  13. {
  14.  
  15. class exercises
  16. {
  17. static void Main(string[] args)
  18. {
  19. int messagesNumber = int.Parse(Console.ReadLine());
  20. string[] phrases = new string[] {
  21. "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."
  22. };
  23. string[] events = new string[] {
  24. "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!"
  25. };
  26. string[] authors = new string[] {
  27. "Diana", "Petya", "Stella", "Elena", "Katya", "Iva", "Annie", "Eva"
  28. };
  29. string[] towns = new string[] {
  30. "Burgas", "Sofia", "Plovdiv", "Varna", "Ruse"
  31. };
  32. Random number = new Random();
  33. for (int message = 0; message < messagesNumber; message++)
  34. {
  35. int phraseIndex = number.Next(0, phrases.Length);
  36. int eventIndex = number.Next(0, events.Length);
  37. int authorIndex = number.Next(0, authors.Length);
  38. int townIndex = number.Next(0, towns.Length);
  39.  
  40. Console.WriteLine(phrases[phraseIndex] + " " + events[eventIndex] + " " + authors[authorIndex] + " - " + towns[townIndex]);
  41. }
  42. }
  43. }
  44.  
  45.  
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement