Advertisement
Guest User

Untitled

a guest
Aug 31st, 2016
1,308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _02.Firm
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var hours = int.Parse(Console.ReadLine());
  14. var days = int.Parse(Console.ReadLine());
  15. var workers = int.Parse(Console.ReadLine());
  16. double workinghours = days * 0.90 * 8;
  17. var overtimehours = days * workers * 2;
  18. double totalHours = Math.Floor(workinghours + overtimehours);
  19. var extraHours = Math.Abs(totalHours - hours);
  20. if (totalHours >= hours) Console.WriteLine("Yes!{0}hours left.", extraHours);
  21. else Console.WriteLine("Not enough time!{0} hours needed.", extraHours);
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement