Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- class Main {
- public static void main(String[] args) {
- scanner = new Scanner(System.in);
- final int COVERAGE = 350; //a gallon of paint covers 350 sq ft/gal
- //declare integers length, width, and height;
- int length;
- int width;
- int height;
- //declare double totalSqFt;
- double totalSqFt;
- //declare double paintNeeded;
- double paintNeeded;
- //Prompt for and read in the length of the room, and assign to length variable
- System.out.println("What is the length of the room?");
- length = scanner.nextInt();
- //Prompt for and read in the width of the room, and assign to width variable
- System.out.println("What is the width of the room?");
- width = scanner.nextInt();
- //Prompt for and read in the height of the room, and assign to height variable
- System.out.println("What is the height of the room?");
- width = scanner.nextInt();
- //Compute the total square feet to be painted--think
- //about the dimensions of each wall
- //Compute the amount of paint needed
- //Print the length, width, and height of the room and the
- //number of gallons of paint needed.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement