Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _01._Supplies_for_School
- {
- class Program
- {
- static void Main(string[] args)
- {
- int countPens = int.Parse(Console.ReadLine());
- int countMarkers = int.Parse(Console.ReadLine());
- double litersCleaner = double.Parse(Console.ReadLine());
- int discount = int.Parse(Console.ReadLine());
- //Пакет химикали - 5.80 лв
- //Пакет маркери - 7.20 лв
- //Препарат - 1.20 лв (за литър)
- double pricePens = countPens * 5.80;
- double priceMarkers = countMarkers * 7.20;
- double priceCleaner = litersCleaner * 1.20;
- double totalPrice = pricePens + priceMarkers + priceCleaner;
- double priceWithDiscount = totalPrice - (totalPrice * discount) / 100;
- Console.WriteLine($"{priceWithDiscount:f3}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment