Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class FishTank {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double Length = Double.parseDouble(scanner.nextLine());
- double Width = Double.parseDouble(scanner.nextLine());
- double Height = Double.parseDouble(scanner.nextLine());
- double Percentage = Double.parseDouble(scanner.nextLine());
- double Volume = Length * Width * Height;
- double TotalLitres = Volume * 0.001;
- double Percentage1 = Percentage * 0.01;
- System.out.printf("%.2f", TotalLitres * (1 - Percentage1));
- }
- }
Add Comment
Please, Sign In to add comment