import java.util.*; public class ShouldIViewThePad { // This program determines whether or not I should view an apartment // as my potential pad. public static void main(String[] args) { Scanner console = new Scanner(System.in); System.out.print("How many bedrooms? "); int numBedrooms = console.nextInt(); System.out.print("How many sq ft? "); int sqFt = console.nextInt(); System.out.print("How much dough? "); double dough = console.nextDouble(); // I will see the apartment if it has at least 1 bedroom, // is at least 700 square feet, and the rent is less than // $800. If the apartment is free, I'll see it no matter // what. if (((numBedrooms >= 1) && (sqFt >= 700) && (dough < 800)) || (dough == 0)) { System.out.println("I'll see it!"); } else { System.out.println("Forget about it!"); } } }