Advertisement
Guest User

main

a guest
Apr 25th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 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 Kolokvij1dotNET {
  8. class Program {
  9. static void Main(string[] args) {
  10.  
  11. Utakmica tekma = new Utakmica("Dinamo - Hajduk", "Stadion Maksimir", 500);
  12. Koncert koncert = new Koncert("U2", "Arena Zagreb", 400);
  13.  
  14. for (int i = 0; i < 20; i++) {
  15. tekma.KupiUlaznicu("C" + i, "D" + i);
  16. }
  17.  
  18. tekma.PrikaziUlaznice();
  19.  
  20. try {
  21. tekma.CijenaUlaznice = 1000;
  22. } catch (Exception ex) {
  23. Console.WriteLine(ex.Message);
  24. }
  25.  
  26. for (int i = 1; i < 1200; i++) {
  27. try {
  28. koncert.KupiUlaznicu("A" + i, "B" + i);
  29. } catch (Exception ex) {
  30. Console.WriteLine(ex.Message);
  31. break;
  32. }
  33. }
  34.  
  35. koncert.PrikaziUlaznice();
  36.  
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement