A Dumb Calculator
Code
/// Name: Rachel Smith
/// Period: 5
/// Program Name: a Dumb Calculator
/// File Name: ADumbCalculator.java
/// Date Finished: 9/23/2015
import java.util.Scanner;
public class ADumbCalculator {
public static void main( String[] args ) {
Scanner keyboard = new Scanner(System.in);
Double n1, n2, n3, n4;
System.out.print( "What is your first number? " );
n1 = keyboard.nextDouble();
System.out.print( "What is your second number? " );
n2 = keyboard.nextDouble();
System.out.print( "What is your third number? " );
n3 = keyboard.nextDouble();
n4 = (n1+n2+n3) / 2;
System.out.println( "\n( " + n1 + " + " + n2 + " + " + n3 + " ) / 2 is... " + n4 );
}
}
Picture of the output