Advertisement
Guest User

Untitled

a guest
Jan 19th, 2021
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.57 KB | None | 0 0
  1. package com.company;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class bottleDeposit {
  6.     public static void main (String [] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         String halfBottles = scanner.nextLine();
  10.         String fullBottles = scanner.nextLine();
  11.  
  12.         double small = Double.parseDouble(halfBottles);
  13.         double big = Double.parseDouble(fullBottles);
  14.  
  15.  
  16.         double resultSmall = small * 0,1;
  17.         double resultBig = big * 0,25;
  18.  
  19.         double result = resultBig + resultSmall;
  20.  
  21.         System.out.println(result);
  22.     }
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement