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 silvanadoc
- {
- class silvanadoc
- {
- static void Main(string[] args)
- {
- int hoursNeeded = int.Parse(Console.ReadLine());
- int daysAvailable = int.Parse(Console.ReadLine());
- int workersOvertime = int.Parse(Console.ReadLine());
- var hoursWorking = (daysAvailable * 0.90) * 8;
- var overtimeHours = workersOvertime * (2 * daysAvailable);
- var allHours = Math.Floor(hoursWorking) + overtimeHours;
- var hoursLeft = Math.Floor(allHours) - hoursNeeded;
- var hoursMore = hoursNeeded - allHours;
- if (allHours >= hoursNeeded)
- {
- Console.WriteLine($"Yes!{Math.Floor(hoursLeft)} hours left.");
- }
- else
- {
- Console.WriteLine($"Not enough time!{Math.Floor(hoursMore)} hours needed.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement