10. Магазин за детски играчки
Някой да каже защо ми дава 90/100 ??
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ToyShop
{
class Program
{
static void Main(string[] args)
{
double excursion = double.Parse(Console.ReadLine());
int puzzles = int.Parse(Console.ReadLine());
int dolls = int.Parse(Console.ReadLine());
int bears = int.Parse(Console.ReadLine());
int minions = int.Parse(Console.ReadLine());
int trucks = int.Parse(Console.ReadLine());
double price = puzzles * 2.60 + dolls * 3 + bears * 4.10 + minions * 8.20 + trucks * 2;
int totalqty = puzzles + dolls + bears + minions + trucks;
if (totalqty>50)
{
price = price*0.75;
}
double totalearn = price * 0.9;
double excursiontotal = totalearn - excursion;
if (excursion <= totalearn)
{
Console.WriteLine( "Yes! {0:f2} lv left.", Math.Abs(excursiontotal));
}
else if (excursion > totalearn)
{
Console.WriteLine("Not enough money! {0:f2} lv needed.",Math.Abs(excursiontotal));
}
}
}
}