Assignemnt #25 and Dumb Calculator
Code
/// Name: Raff Lisbona
/// Period: 6
/// Program Name: Dumb Calculator
/// File Name: DumbCalculator.java
/// Date Finished: 9/29/2015
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