Advertisement
Spocoman

Fish Land

Sep 6th, 2024
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.74 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         double mackerelPrice = Double.parseDouble(scanner.nextLine()),
  7.                 spratPrice = Double.parseDouble(scanner.nextLine()),
  8.                 bonitoFishKg = Double.parseDouble(scanner.nextLine()),
  9.                 saffronKg = Double.parseDouble(scanner.nextLine()),
  10.                 shellKg = Double.parseDouble(scanner.nextLine()),
  11.                 bonitoFishSum = bonitoFishKg * mackerelPrice * 1.60,
  12.                 saffronSum = saffronKg * spratPrice * 1.80,
  13.                 shellSum = shellKg * 7.50;
  14.  
  15.         System.out.printf("%.2f\n", bonitoFishSum + saffronSum + shellSum);
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement