Assignemnt #31

Code

///Colin Hinton
///5th Period
///Complex Boolean Expression
///CBE.java
///9/28/2015

import java.util.Scanner;

class CBE
{
    public static void main (String [] agrs)
    {
        Scanner keyboard = new Scanner(System.in);
        
        int age;
        double income, scale;
        boolean allowed;
        
        System.out.print("Enter your age: ");
        age = keyboard.nextInt();
        
        System.out.print("Enter your yearly income: ");
        income = keyboard.nextDouble();
        
        System.out.print("How attractive are you on a scale on 0.0 to 10.0?");
        scale = keyboard.nextDouble();
        
        allowed = ( age > 25 && age < 40 && (income > 50000 || scale >= 9.9));    
        System.out.println(" So are you allowed to date my married mother? " + allowed);
    }
}

    

Picture of the output

Assignment 1