Assignemnt #25 and Dumb Calculator
Code
/// Name: Kyle Ivy
/// Period: 5
/// Program Name: DumbCalculator
/// File Name: DumbCalculator.java
/// Date Finished: 10/6/2015
import java.util.Scanner;
public class DumbCalculator {
public static void main( String[] args ) {
Scanner keyboard = new Scanner(System.in);
double first, second, third, answer;
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();
System.out.println();
answer = (first + second + third)/2;
System.out.println( "( " + first + " + " + second + " + " + third + ") / 2 is... " + answer );
}
}
prog25.PNG