Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace MoneyBB
- {
- class Money
- {
- public int Banknote; // Номинал
- public int Count; // Количество
- int totalSumm;
- public int Sum()
- {
- this.totalSumm = this.Banknote * this.Count;
- return this.totalSumm;
- }
- }
- class Euro : Money
- {
- public float EurInUAH = 1.5f;
- public float BanknotesInEur()
- {
- float UAH;
- UAH = base.Sum() / this.EurInUAH;
- return UAH;
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- Euro obj = new Euro();
- obj.Banknote = 5;
- obj.Count = 5;
- Console.WriteLine(obj.Sum());
- Console.WriteLine(obj.BanknotesInEur());
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment