Assignment #25 and A Dumb Calculator
Code
/// Name: Brendan Baird
/// Period: 6
/// Program Name: A Dumb Calculator
/// File Name: DumbCalculator.java
/// Date Finished: 9/25/2015
import java.util.Scanner;
public class DumbCalculator{
public static void main(String[] args){
double number1, number2, number3, resultNumber;
Scanner keyboard = new Scanner(System.in);
System.out.print("What is your first number? ");
number1 = keyboard.nextDouble();
System.out.print("What is your second number? ");
number2 = keyboard.nextDouble();
System.out.print("What is your third number? ");
number3 = keyboard.nextDouble();
resultNumber = (number1 + number2 + number3) / 2;
System.out.println("( " + number1 + " + " + number2 + " + " + number3 + " ) / 2 is... " + resultNumber);
}
}
Picture of the output