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