zadanie4.cs 824 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace ГончароваНЕ_ПР3
  7. {
  8. internal class zadanie4
  9. {
  10. int Sroom;
  11. int SPlitki;
  12. public int value_Sroom
  13. {
  14. set
  15. {
  16. Sroom = value;
  17. }
  18. }
  19. public int value_SPlitki
  20. {
  21. set
  22. {
  23. SPlitki = value;
  24. }
  25. }
  26. public double countPlinki
  27. {
  28. get
  29. {
  30. double countPlinki = Sroom / SPlitki;
  31. if (countPlinki % 2 != 0)
  32. {
  33. countPlinki = Math.Round(countPlinki);
  34. }
  35. return countPlinki;
  36. }
  37. }
  38. }
  39. }