Assignemnt #25 and A Dumb Calculator
Code
/// Name: Brian Phillips
/// Period: 5
/// Program name: A Dumb Calculator
/// File Name: DumbCalculator.java
/// Date Finished: 10/13/2015
import java.util.Scanner;
public class DumbCalculator
{
public static void main( String[] args )
{
Double one, two, three, total;
Scanner keyboard = new Scanner(System.in);
System.out.print( "What is your first number? " );
one = keyboard.nextDouble();
System.out.print( "What is your second number? " );
two = keyboard.nextDouble();
System.out.print( "What is your third number? " );
three = keyboard.nextDouble();
total = (one + two + three)/2;
System.out.println( " ( " + one + " + " + two + " + " + three + " ) / 2 is... " + total);
}
}
Picture of the output