Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Furniture {
- /**
- *@ConnorSiebens
- */
- public static void main(String[] args) {
- Scanner keyboard = new Scanner(System.in);
- int wood,size,price=0;
- System.out.println("Enter 1 for pine, 2 for oak, or 3 for mahogany.");
- wood = keyboard.nextInt();
- System.out.println("Enter 1 for large and 2 for small");
- size = keyboard.nextInt();
- if (wood == 1) {
- if (size == 1) {
- price = 135;
- } else if(size == 2) {
- price = 100;
- }
- }
- if (wood == 2) {
- if (size == 1) {
- price = 260;
- } else if(size == 2) {
- price = 225;
- }
- }
- if (wood == 3) {
- if (size == 1) {
- price = 345;
- } else if(size == 2) {
- price = 310;
- }
- }
- System.out.println("The price of the table is $"+price);
- keyboard.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement