Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package c01_Simple_Calculations;
- import java.util.Scanner;
- public class p08_TriangleArea {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int l = Integer.parseInt(scan.nextLine());
- int w = Integer.parseInt(scan.nextLine());
- int h = Integer.parseInt(scan.nextLine());
- double percentage = Double.parseDouble(scan.nextLine());
- double volume = l * w * h;
- volume *= 0.001;
- volume -= volume * (percentage / 100);
- System.out.printf("%.3f", volume);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement