Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace AddBags
- {
- class Program
- {
- static void Main(string[] args)
- {
- double priceOver20kg = double.Parse(Console.ReadLine());
- double bagWeight = double.Parse(Console.ReadLine());
- int dayBefore = int.Parse(Console.ReadLine());
- int bagCount = int.Parse(Console.ReadLine());
- if (bagWeight < 10)
- {
- priceOver20kg /= 5;
- }
- else if (bagWeight <= 20)
- {
- priceOver20kg /= 2;
- }
- if (dayBefore < 7)
- {
- priceOver20kg *= 1.4;
- }
- else if (dayBefore <= 30)
- {
- priceOver20kg *= 1.15;
- }
- else if (dayBefore > 30)
- {
- priceOver20kg *= 1.1;
- }
- double total = priceOver20kg * bagCount;
- Console.WriteLine($" The total price of bags is: {total:f2} lv. ");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement