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