Guest User

Untitled

a guest
Feb 22nd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace MoneyBB
  9. {
  10. class Money
  11. {
  12. public int Banknote; // Номинал
  13. public int Count; // Количество
  14. int totalSumm;
  15.  
  16. public int Sum()
  17. {
  18. this.totalSumm = this.Banknote * this.Count;
  19. return this.totalSumm;
  20. }
  21. }
  22.  
  23. class Euro : Money
  24. {
  25. public float EurInUAH = 1.5f;
  26. public float BanknotesInEur()
  27. {
  28. float UAH;
  29. UAH = base.Sum() / this.EurInUAH;
  30. return UAH;
  31. }
  32. }
  33. class Program
  34. {
  35. static void Main(string[] args)
  36. {
  37. Euro obj = new Euro();
  38. obj.Banknote = 5;
  39. obj.Count = 5;
  40. Console.WriteLine(obj.Sum());
  41. Console.WriteLine(obj.BanknotesInEur());
  42. Console.ReadKey();
  43.  
  44. }
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment