Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. class Main {
  4. public static void main(String[] args) {
  5. scanner = new Scanner(System.in);
  6.  
  7. final int COVERAGE = 350; //a gallon of paint covers 350 sq ft/gal
  8. //declare integers length, width, and height;
  9. int length;
  10. int width;
  11. int height;
  12.  
  13. //declare double totalSqFt;
  14. double totalSqFt;
  15.  
  16. //declare double paintNeeded;
  17. double paintNeeded;
  18.  
  19. //Prompt for and read in the length of the room, and assign to length variable
  20. System.out.println("What is the length of the room?");
  21. length = scanner.nextInt();
  22.  
  23. //Prompt for and read in the width of the room, and assign to width variable
  24. System.out.println("What is the width of the room?");
  25. width = scanner.nextInt();
  26. //Prompt for and read in the height of the room, and assign to height variable
  27. System.out.println("What is the height of the room?");
  28. width = scanner.nextInt();
  29.  
  30. //Compute the total square feet to be painted--think
  31. //about the dimensions of each wall
  32.  
  33.  
  34. //Compute the amount of paint needed
  35.  
  36. //Print the length, width, and height of the room and the
  37. //number of gallons of paint needed.
  38.  
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement