Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Work_hours
- {
- class Program
- {
- static void Main(string[] args)
- {
- int workHours = int.Parse(Console.ReadLine());
- int workers = int.Parse(Console.ReadLine());
- int workDays = int.Parse(Console.ReadLine());
- var workTime = workers * workDays * 8;
- var result = 0.0;
- if (workTime > workHours)
- {
- result = (workTime - workHours);
- Console.WriteLine("{0} hours left", result);
- }
- else if (workTime < workHours)
- {
- result = (workHours - workTime);
- Console.WriteLine("{0} overtime", result);
- Console.WriteLine($"Penalties: {result * workDays}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement