Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double mackerelPrice = Double.parseDouble(scanner.nextLine()),
- spratPrice = Double.parseDouble(scanner.nextLine()),
- bonitoFishKg = Double.parseDouble(scanner.nextLine()),
- saffronKg = Double.parseDouble(scanner.nextLine()),
- shellKg = Double.parseDouble(scanner.nextLine()),
- bonitoFishSum = bonitoFishKg * mackerelPrice * 1.60,
- saffronSum = saffronKg * spratPrice * 1.80,
- shellSum = shellKg * 7.50;
- System.out.printf("%.2f\n", bonitoFishSum + saffronSum + shellSum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement