Assignment #25 and DumbCalculator
Code
/// Name: Jason Kim
/// Period: 7
/// Program Name: DumbCalculator
/// File Name: DumbCalculator.java
/// Date Finished:9/25/15
import java.util.Scanner;
public class DumbCalculator
{
public static void main (String[] args)
{
Scanner keyboard = new Scanner(System.in);
double firstNumb, secondNumb, thirdNumb;
System.out.print("What is your first number? ");
firstNumb = keyboard.nextDouble();
System.out.print("What is your second number? ");
secondNumb = keyboard.nextDouble();
System.out.print("What is your third number? ");
thirdNumb = keyboard.nextDouble();
System.out.println();
System.out.println("( " + firstNumb + " + " + secondNumb + " + " + thirdNumb + " )"
+ "/ 2 is... " + ((firstNumb + secondNumb + thirdNumb)/2));
}
}
Picture of the output