Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace tESt
- {
- class Program
- {
- static void Main(string[] args)
- {
- var hoursNeed = int.Parse(Console.ReadLine());
- var workers = int.Parse(Console.ReadLine());
- var days = int.Parse(Console.ReadLine());
- var dayInHours = 8;
- var totalWorkHours = workers * days * dayInHours;
- var diff = hoursNeed - totalWorkHours;
- if (diff < 0)
- {
- diff = Math.Abs(diff);
- Console.WriteLine($"{diff} hours left");
- }
- else
- {
- diff = Math.Abs(diff);
- var penalties = diff * days;
- Console.WriteLine($"{diff} overtime");
- Console.WriteLine($"Penalties: {penalties}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment