Advertisement
Sim0o0na

Untitled

Apr 16th, 2018
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1. package TestApril14_15;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class ANDprocessor {
  6.     public static void main(String[] agrs) {
  7.         Scanner scanner = new Scanner(System.in);
  8.         int processors = Integer.parseInt(scanner.nextLine());
  9.         int workers = Integer.parseInt(scanner.nextLine());
  10.         int days = Integer.parseInt(scanner.nextLine());
  11.  
  12.         int workHours = workers * days * 8;
  13.         int procReady = (int) Math.floor(workHours / 3);
  14.         if (procReady < processors) {
  15.             System.out.printf("Losses: -> %.2f BGN", (processors - procReady) * 110.10);
  16.         } else {
  17.             System.out.printf("Profit: -> %.2f BGN", (procReady - processors) * 110.10);
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement