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 ConsoleApplication4
- {
- class Program
- {
- static void Main(string[] args)
- {
- var needHours = double.Parse(Console.ReadLine());
- var players = double.Parse(Console.ReadLine());
- var workedDays = double.Parse(Console.ReadLine());
- var work = (players * workedDays) * 8;
- var penalties = work - needHours;
- if (work > needHours)
- {
- Console.WriteLine($"{penalties:f0} hours left");
- }
- else if (work < needHours)
- {
- Console.WriteLine($"{Math.Abs(penalties):f0} overtime");
- Console.WriteLine($"Penalties: {Math.Abs(penalties) * workedDays:f0}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment