Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace MyApp
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- var projecthours = int.Parse(Console.ReadLine());
- var availabledays = int.Parse(Console.ReadLine());
- var overtimeWorkers = int.Parse(Console.ReadLine());
- double workDays = availabledays * 0.9;
- double overtimeHours = overtimeWorkers * workDays * 2;
- double workHours = overtimeHours + workDays * 8 * overtimeWorkers;
- double hoursDiff = Math.Floor(Math.Abs(projecthours - workHours));
- if (workHours >= projecthours)
- {
- Console.WriteLine("Yes!{0} hours left.", hoursDiff);
- }
- else
- {
- Console.WriteLine("Not enough time!{0} hours needed.",hoursDiff);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement