Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 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. }
  17.  
  18. public class MultitoreyBuilding : Structure
  19. {
  20. public int Floor;
  21. public int AreaOfOneFloor(MultitoreyBuilding house)
  22. {
  23. return house.TotalArea / house.Floor;
  24. }
  25. }
  26.  
  27. class Program
  28. {
  29. static void Main()
  30. {
  31. MultitoreyBuilding house = new MultitoreyBuilding();
  32. Console.WriteLine("ваш дом находится в городе", house.Town, "на улице", house.Street);
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement