Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package TestApril14_15;
- import java.util.Scanner;
- public class ANDprocessor {
- public static void main(String[] agrs) {
- Scanner scanner = new Scanner(System.in);
- int processors = Integer.parseInt(scanner.nextLine());
- int workers = Integer.parseInt(scanner.nextLine());
- int days = Integer.parseInt(scanner.nextLine());
- int workHours = workers * days * 8;
- int procReady = (int) Math.floor(workHours / 3);
- if (procReady < processors) {
- System.out.printf("Losses: -> %.2f BGN", (processors - procReady) * 110.10);
- } else {
- System.out.printf("Profit: -> %.2f BGN", (procReady - processors) * 110.10);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement