Programming Basics Exam 26 April 2015 Evening
Здравейте!Трябва ми малко помощ при задача Compoud interest ,стигам до третото число да въведа и се чупи ето и моето решение:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace labizpit
{
    class CompoundInterest
    {
        static void Main(string[] args)
        {
            double priceOfTv = double.Parse(Console.ReadLine());
            int bankLoanTerm = int.Parse(Console.ReadLine());
            double  bankInterestRate = double.Parse(Console.ReadLine());
            double friendInterest = double.Parse(Console.ReadLine());
            double bankPrise = Math.Pow (1 +  bankInterestRate , bankLoanTerm) * priceOfTv;
            double friendPrice = (1 + friendInterest)* priceOfTv;
            double bestPrice = Math.Min(bankPrise, friendPrice);
            string bestLender = bankPrise < friendPrice ? "Bank" : "Friend";
            Console.WriteLine("{0:F2}{1}", bestPrice, bestLender);
        }
    }
}
Благодаря!Сега я пробвах отново и тръгна,но сложих интервала м/у числото и Bank.