Assignment #31

Code

///Name: Mahima Choudhary
///Period: 6
///Project Name: CBE
///File Name: CBE.java
///Date Finished: 10/14/15

import java.util.Scanner;

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

Picture of the output

YourInitials.html