Advertisement
dragonbs

Computer Firm

Oct 26th, 2022
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.60 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Business
  4. {
  5.     class Business
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int Hours = int.Parse(Console.ReadLine());
  10.             int Day = int.Parse(Console.ReadLine());
  11.             int Works = int.Parse(Console.ReadLine());
  12.             double WorkProgect = 0.9 * Day * 8 + Works * 2 * Day;
  13.             if (WorkProgect >= Hours)
  14.                 Console.WriteLine("Yes!{0} hours left.", Math.Floor(WorkProgect - Hours));
  15.             else Console.WriteLine("Not enough time!{0} hours needed.", Math.Ceiling(Hours - WorkProgect));
  16.         }
  17.     }
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement