Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _06._Vet_Parking
- {
- class Program
- {
- static void Main(string[] args)
- {
- int days = int.Parse(Console.ReadLine());
- int hoursCount = int.Parse(Console.ReadLine());
- double sum = 0.0;
- for (int i = 1; i <= days; i++)
- {
- double tax = 0.0;
- for (int j = 1; j <= hoursCount; j++)
- {
- if (i % 2 == 0 && j % 2 != 0)
- {
- tax += 2.50;
- }
- else if (i % 2 != 0 && j % 2 == 0)
- {
- tax += 1.25;
- }
- else
- {
- tax += 1;
- }
- }
- Console.WriteLine($"Day: {i} - {tax:f2} leva");
- sum += tax;
- }
- Console.WriteLine($"Total: {sum:f2} leva");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement