Advertisement
Alekscho85

WorkHours

Oct 7th, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.77 KB | None | 0 0
  1. using System;
  2. namespace _13.WorkHours
  3. {
  4.     class WorkHours
  5.     {
  6.         static void Main()
  7.         {
  8.             int projectHours = int.Parse(Console.ReadLine());
  9.             int availableDays = int.Parse(Console.ReadLine());
  10.             int workTimePercentage = int.Parse(Console.ReadLine());
  11.  
  12.             decimal workDays = availableDays * 0.90m;
  13.             int workHoursPerDay = 12;
  14.             decimal workHours = Math.Floor(workDays * workHoursPerDay * workTimePercentage / 100.0m);
  15.  
  16.             if (projectHours <= workHours)
  17.             {
  18.                 Console.WriteLine("Yes");
  19.             }
  20.             else
  21.             {
  22.                 Console.WriteLine("No");
  23.             }
  24.             Console.WriteLine(workHours - projectHours);
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement