Задача 3. Финален конкурс
Здравейте,
Опитвам се да си намеря грешката в задачата. Може ли малко помощ.
int dancers=int.Parse(Console.ReadLine());
decimal score=decimal.Parse(Console.ReadLine());
string season=Console.ReadLine().ToLower();
string place=Console.ReadLine().ToLower();
decimal totalscore=0.00m;
decimal score1=0.00m;
if(place=="bulgaria")
{
totalscore=score*dancers;
if(season=="summer")
{
score1=totalscore*0.95m;
}
else if(season=="winter")
{
score1=totalscore*0.92m;
}
var cherity=score1*0.75m;
var leftMoney=(score1-cherity)/dancers;
Console.WriteLine("Charity - {0:f2}",cherity);
}
else if(place=="abroad")
{
totalscore=score+(score/2);
if(season=="summer")
{
score1=totalscore*0.9m;
}
else if(season=="winter")
{
score1=totalscore*0.85m;
}
var cherity=score1*0.75m;
var leftMoney=(score1-cherity)/dancers;
Console.WriteLine("Charity - {0:f2}",cherity);
Console.WriteLine("Money per dancer - {0:f2}",leftMoney);
}
}
}