Assignemnt #25 and Dumb Calculator
Code
///Name: Daniel Tiffant-Appleton
///Period: 7
///Program Name: Dumb Calculator
///File Name: DumbCalculator
///Date Finished: 9/25/15
import java.util.Scanner;
public class DumbCalculator
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
double firstNumber, secondNumber, thirdNumber, product;
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();
product = (firstNumber + secondNumber + thirdNumber)/2;
System.out.println( "" );
System.out.println( "(" + firstNumber + " + " + secondNumber + " + " + thirdNumber + ")/2 is..." + product );
}
}
Picture of the output