Assignemnt #25 A Dumb Calculator
Code
/// Tyler Hart
/// Period: 5
/// Program name: A Dumb Calculator
/// File name: ADumbCalculator.java
/// Date Finished: 9/24/2015
import java.util.Scanner;
public class ADumbCalculator
{
public static void main (String[] args)
{
double one, two, three, ans;
Scanner keyboard = new Scanner(System.in);
System.out.print("What is your first number? ");
one = keyboard.nextDouble();
System.out.print("What is your Second number? ");
two = keyboard.nextDouble();
System.out.print("What is your third number? ");
three = keyboard.nextDouble();
ans = (one+two+three)/2;
System.out.println("( " + one + " + " + two + " + " + three + " ) / 2 is ..." + ans);
}
}
Picture of the output