Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- double over20 = double.Parse(Console.ReadLine());
- double kg = double.Parse(Console.ReadLine());
- int days = int.Parse(Console.ReadLine());
- int lug = int.Parse(Console.ReadLine());
- double lugPr = 0;
- double total = lugPr * lug;
- double price = 0;
- if (kg > 20 && days >30)
- {
- lugPr = over20;
- price = total + total * 0.10;
- }
- else if (kg >= 10 && kg <= 20 && days >=7 && days <=30)
- {
- lugPr = over20 * 0.5;
- price = total + total * 0.15;
- }
- else if (kg < 10 && days<7)
- {
- lugPr = over20 * 0.2;
- price = total + total * 0.40;
- }
- Console.WriteLine($"The total price of bags is: {price} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement