fork download
  1. using System;
  2.  
  3. namespace Program
  4. {
  5. public class Program
  6. {
  7. public static void Main()
  8. {
  9. Punkt.Punkt punkt1 = new Punkt.Punkt();
  10. punkt1.x = 100;
  11. punkt1.y = 200;
  12. Console.WriteLine("Wspolrzedna x = " + punkt1.PobierzX());
  13. Console.WriteLine("Wspolrzedna y = " + punkt1.PobierzY());
  14. }
  15. }
  16. }
  17.  
  18. namespace Punkt
  19. {
  20. public class Punkt
  21. {
  22. public int x;
  23. public int y;
  24.  
  25. public int PobierzX()
  26. {
  27. return x;
  28. }
  29.  
  30. public int PobierzY()
  31. {
  32. return y;
  33. }
  34. }
  35. }
Success #stdin #stdout 0.01s 131648KB
stdin
Standard input is empty
stdout
Wspolrzedna x = 100
Wspolrzedna y = 200