Assignemnt #25 and Dumb Calculator
Code
/// Name: David Shkolnikov
/// Period: 6
/// Program Name: DumbCalculator
/// File Name: DumbCalculator.java
/// Date Finished: 10/6/15
import java.util.Scanner;
public class DumbCalculator
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner (System.in);
double fNumber, sNumber, tNumber, average;
System.out.print( "What is your first number? " );
fNumber = keyboard.nextDouble();
System.out.print( "What is your second number? " );
sNumber = keyboard.nextDouble();
System.out.print( "What is your third number? " );
tNumber = keyboard.nextDouble();
average = ( fNumber + sNumber + tNumber ) / 2;
System.out.println( "( " + fNumber + " + " + sNumber + " + " + tNumber + " ) / 2 is... " + average );
}
}
Picture of the output