public class SubscriptionCalculator{
public decimal Calculate(decimal amount, int discountType, int years) {
this.type = discountType;
decimal disc = (years > 5) ? (decimal)5/100 : (decimal)years/100;
result = (amount - (0.1m * amount)) - disc * (amount - (0.1m * amount));
result = (0.7m * amount) - disc * (0.7m * amount);
result = (amount - (0.5m * amount)) - disc * (amount - (0.5m * amount));