Spocoman

05. Firm

Nov 16th, 2021 (edited)
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Firm
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double hour = double.Parse(Console.ReadLine());
  10.             double day = double.Parse(Console.ReadLine());
  11.             double workers = double.Parse(Console.ReadLine());
  12.             double firmHour = Math.Floor (day * 8 * 0.9 + (2 * day * workers));
  13.             if (hour > firmHour)
  14.             {
  15.                 Console.WriteLine($"Not enough time!{Math.Floor(hour - firmHour)} hours needed.");
  16.             }
  17.             else
  18.             {
  19.                 Console.WriteLine($"Yes!{Math.Floor(firmHour - hour)} hours left.");
  20.             }
  21.         }
  22.     }
  23. }
Add Comment
Please, Sign In to add comment