// CSE 142, Autumn 2010, Jessica Miller // This program determines whether or not I should view an apartment // as my potential pad. I will view an apartment if it is $600 or // less per month, is at least 500 sq feet, has at least 1 bedroom, // and has at least 1 hot tub. Or, no matter what the other conditions // are, if the apartment is free I will go view it. import java.util.*; public class ShouldIViewThePad { public static void main(String[] args) { Scanner console = new Scanner(System.in); System.out.print("Price? " ); int price = console.nextInt(); System.out.print("Sqft? " ); int sqft = console.nextInt(); System.out.print("Bedrooms? "); int bedrooms = console.nextInt(); System.out.print("No. of hot tubs? "); int numHotTubs = console.nextInt(); if (((price <= 600) && (sqft >= 500) && (bedrooms >= 1) && (numHotTubs >= 1)) || (price == 0)) { System.out.print("HECK YEAH!"); } else { System.out.print("forget about it!"); } } }