Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ZadachiOtIzpita2;
- import java.util.Scanner;
- public class ANDProcessor {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int countProssors = Integer.parseInt(scanner.nextLine());
- int countWorkers = Integer.parseInt(scanner.nextLine());
- int workingDay = Integer.parseInt(scanner.nextLine());
- double sum = workingDay * countWorkers * 8;
- double midle = Math.floor(sum / 3);
- if (midle < countProssors)
- {
- System.out.printf("Losses: -> %.2f BGN", (countProssors - midle) * 110.1);
- }
- else
- {
- System.out.printf("Profit: -> %.2f BGN", (midle - countProssors) * 110.1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment