Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace CatTrainingAttendance
- {
- class Program
- {
- static void Main(string[] args)
- {
- int startHours = int.Parse(Console.ReadLine());
- int checkHours = int.Parse(Console.ReadLine());
- int checkMinutes = int.Parse(Console.ReadLine());
- string dayOfWeek = Console.ReadLine();
- double bonusPoints = 0;
- if (checkHours < startHours && checkHours <= (startHours - 1))
- {
- bonusPoints = 1.5;
- }
- else if (checkHours == startHours && checkMinutes <= 30)
- {
- bonusPoints = 1;
- }
- else if ((checkHours == startHours && checkMinutes > 30) || checkHours <= (startHours + 4))
- {
- bonusPoints = 0.5;
- }
- switch (dayOfWeek)
- {
- case "Monday":
- case "Wednesday":
- case "Friday":
- bonusPoints += 0.6;
- break;
- case "Tuesday":
- case "Thursday":
- case "Saturday":
- bonusPoints += 0.8;
- break;
- case "Sunday":
- bonusPoints += 2;
- break;
- }
- Console.WriteLine($"{bonusPoints:F2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement