- Console.Write("What is your name: ");
- string name =Console.ReadLine();
- //imeto se zapisva za da moje po lesno da se razbere za kogo se govori vas ili klientite
- Console.Write("How much does your vacation cost: ");
- int vacationPrice = Convert.ToInt32(Console.ReadLine());
- if(vacationPrice>=0)
- {
- Console.WriteLine($"n{name} you have to open a shop so you can have money for the vacation.n");
- Console.WriteLine("Welcome to the new shop of ITPG high school.n ---Here are the prices---");
- Console.WriteLine(" puzzle = 2.60 lv");
- Console.WriteLine(" talking doll = 3.00 lv");
- Console.WriteLine(" teddy bear = 4.10 lv");
- Console.WriteLine(" minion = 8.20 lv");
- Console.WriteLine(" toy car = 2.00 lv");
- Console.Write("how many Puzzles do you want: ");
- int orderPuzzel = Convert.ToInt32(Console.ReadLine());
- Console.Write("how many Dolls do you want: ");
- int orderDoll = Convert.ToInt32(Console.ReadLine());
- Console.Write("how many Teddy bears do you want: ");
- int orderBear = Convert.ToInt32(Console.ReadLine());
- Console.Write("how many Minions do you want: ");
- int orderMInion = Convert.ToInt32(Console.ReadLine());
- Console.Write("how many Car toys do you want: ");
- int orderCar = Convert.ToInt32(Console.ReadLine());
- double totalPrice = (orderPuzzel*2.6 + orderDoll*3 + orderBear*4.1 + orderMInion*8.2 + orderCar*2);
- if (orderPuzzel + orderDoll+ orderBear + orderMInion + orderCar >= 50)
- {
- double discount = (totalPrice)*0.25;
- Console.WriteLine($"Because your order is over 50 here is a discount of 25%nWhich is Equal to {Math.Round(discount, 2)} lv");
- Console.WriteLine($"your total comes up to:{Math.Round(totalPrice-discount,2)} lv.");
- if (vacationPrice < (totalPrice-discount)*0.10)
- {
- Console.WriteLine($"{name} you've exeeded the price of the vacation so you have {Math.Round(totalPrice*0.10-vacationPrice),2} lv left");
- }
- else if( vacationPrice > (totalPrice-discount)*0.10)
- {
- Console.WriteLine($"{name} you have to safe {Math.Round(vacationPrice-(totalPrice-discount)*0.10)} lv more.");
- }
- else
- {
- Console.WriteLine($" {name} you have the exact amount of money for the vacation");
- }
- }
- else
- {
- Console.WriteLine("You don't have a discount.");
- if (vacationPrice < totalPrice*0.1)
- {
- Console.WriteLine($" {name} you've exeeded the price of the vacation so you have {Math.Round(totalPrice*0.1-vacationPrice),2} lv left");
- }
- else if( vacationPrice > totalPrice*0.1)
- {
- System.Console.WriteLine($"{name} you have to safe {Math.Round(vacationPrice-totalPrice*0.1)} lv more.");
- }
- else
- {
- Console.WriteLine($"{name} you have the exact amount of money for the vacation");
- }
- }
- }
- else
- {
- System.Console.WriteLine("The vacation can't be negative value.");
- }
- Console.ReadKey();