Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class u1 {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double area = Double.parseDouble(scanner.nextLine());
- double kgGrape = Double.parseDouble(scanner.nextLine());
- double badGrapeKg = Double.parseDouble(scanner.nextLine());
- double totalGrape = (area * kgGrape) - badGrapeKg;
- double grapeforRakia = totalGrape*0.45;
- double rakiaProfit =(((totalGrape*0.45) / 7.50) * 9.80);
- double grapeProfit = ((totalGrape - grapeforRakia) * 1.50);
- System.out.printf("%.2f%n", rakiaProfit);
- System.out.printf("%.2f", grapeProfit);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement