Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class examtask2 {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int countProcessors = Integer.parseInt(scan.nextLine());
- int countEmployee = Integer.parseInt(scan.nextLine());
- int countDays = Integer.parseInt(scan.nextLine());
- double workhours = countEmployee * countDays * 8;
- double timeprocesors = Math.floor(workhours / 3);
- if (timeprocesors < countProcessors) {
- double proc = countProcessors - timeprocesors;
- System.out.printf("Losses: -> %.2f BGN", proc * 110.10);
- } else {
- double procs = timeprocesors - countProcessors;
- System.out.printf("Profit: -> %.2f BGN", procs * 110.10);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement