Advertisement
qre

0405sprawdzic

qre
Jan 20th, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1.  
  2. using System;
  3.  
  4. namespace Kalucki4_5
  5. {
  6.  
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. Console.ReadKey();
  12. }
  13. }
  14.  
  15. public interface IFigura
  16. {
  17. int Obwod { get; }
  18. int Pole { get; }
  19. }
  20.  
  21. public class Kwadrat : IFigura
  22. {
  23.  
  24. private int dl_boku_kwadrat;
  25. public int obwod_kwadrat;
  26. public int pole_kwadrat;
  27.  
  28. public int Obwod {
  29. get {
  30. obwod_kwadrat = 4 * dl_boku_kwadrat;
  31. return 0;
  32. } }
  33.  
  34.  
  35. public int Pole {
  36. get {
  37. pole_kwadrat = dl_boku_kwadrat * dl_boku_kwadrat;
  38. return 0;
  39. }}
  40.  
  41.  
  42. public override string ToString()
  43. {
  44. return dl_boku_kwadrat.ToString();
  45. }
  46.  
  47.  
  48. }
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement