Advertisement
desislava_topuzakova

2. AND Processors

Apr 16th, 2018
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. <?php
  2.  
  3. $processors = readline();
  4. $workers = readline();
  5. $days = readline();
  6.  
  7.         $workHours = $workers * $days * 8;
  8.         $procReady = (int) floor($workHours / 3);
  9.         if ($procReady < $processors) {
  10.             printf("Losses: -> %.2f BGN", ($processors - $procReady) * 110.10);
  11.         } else {
  12.             printf("Profit: -> %.2f BGN", ($procReady - $processors) * 110.10);
  13.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement