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