Example #1
0
            public static CultureStrings GetSubTemplate1(out IImmutableList <String> result)
            {
                Decimal first  = RandomUtils.NextDecimal(-20, 30).Round(2).ToNonZero();
                Decimal second = RandomUtils.NextDecimal(-20, 30).Round(2).ToNonZero();
                Decimal third  = RandomUtils.NextDecimal(-20, 30).Round(2).ToNonZero();

                Decimal answer = (first * (second + third)).Round(2);

                result = EnumerableUtils.GetEnumerableFrom(answer.GetString(NumberFormatInfo.CurrentInfo), answer.GetString()).Distinct().ToImmutableArray();

                String template =
                    $@"{first.GetString()} \cdot ({second.GetString()} {third.ToSign()} {third.Abs().GetString()})";

                return(new CultureStrings(template));
            }