Assignment 25 and Dumb Calc
Code
/// Name: Matthew Hughs
/// Period: 5
/// Program Name: Dumb Calc
/// File Name: Dumbcalc.java
/// Date Finished: 9/25/2015
import java.util.Scanner;
class Dumbcalc
{
public static void main(String [] args)
{
Scanner keyboard = new Scanner(System.in);
double first, second, third, solution;
System.out.print(" What is your first number? ");
first = keyboard.nextDouble();
System.out.print(" What is your second number? ");
second = keyboard.nextDouble();
System.out.print(" What is your third number? ");
third = keyboard.nextDouble();
solution = ((first + second + third) / 2);
System.out.println( "( " + first + " + " + second + " + " + third + " ) / 2 is..." + solution + ".");
}
}
Picture of the output