Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 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 ConsoleApp12
  8. {
  9.  
  10. public class Structure
  11. {
  12. public string Town;
  13. public string Street;
  14. public int Number;
  15. public int TotalArea;
  16. public void Write()
  17. {
  18. Console.WriteLine("ваш дом находится в городе", Town,
  19. "на улице", Street, "его номер:", Number, "площадь:", TotalArea);
  20. }
  21. }
  22.  
  23. public class MultitoreyBuilding : Structure
  24. {
  25. public int Floor;
  26. public int AreaOfOneFloor(MultitoreyBuilding house)
  27. {
  28. return house.TotalArea / house.Floor;
  29. }
  30. }
  31.  
  32. class Program
  33. {
  34. static void Main()
  35. {
  36.  
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement