Assignment #25

Code

    ///Name: Cody Swain
    ///Period: 6
    ///Project Name: DumbCalculator
    ///File Name: DumbCalculator.java
    ///Date: 10/2/15
    
    import java.util.Scanner;
    
    public class DumbCalculator
    {
        public static void main( String[] args )
        {
            double firstnumber, secondnumber, thirdnumber, finalnumber;
            
            Scanner keyboard = new Scanner(System.in);
            
            System.out.print("What is your first number? ");
            firstnumber = keyboard.nextDouble();
            
            System.out.print("What is your second number? ");
            secondnumber = keyboard.nextDouble();
            
            System.out.print("What is your third number? ");
            thirdnumber = keyboard.nextDouble();
            
            finalnumber = (firstnumber + secondnumber + thirdnumber)/2;
            System.out.println("( " + firstnumber + " + " + secondnumber + " + " + thirdnumber + " ) / 2 is .. " + finalnumber );
            
        }
    }
        
    

Picture of the output

Assignment 25