Assignment #25

Code

/// Name: Dr. Jonathan Stine 
/// Period 5
/// Program Name: DumbCalculator
/// File Name: DumbCalculator.java
/// Date Finished: 10/10/2015

import java.util.Scanner;

public class DumbCalculator
{
    public static void main( String[] args )
    {
        Scanner keyboard = new Scanner(System.in);
         
        Double first, second, third, last;
        
        System.out.print( "What is your first number? " );
        first = keyboard.nextDouble();
    
        System.out.print( "What is your second number? " );
        second = keyboard.nextDouble();
    
        System.out.print( "What is your third number? " );
        third = keyboard.nextDouble();
            
        last = (first+second+third) / 2;
    
        System.out.println( "\n( " + first + " + " + second + " + " + third + " ) / 2 is... " + last );
            
    }
}

    

Code Output