Assignemnt #25
Code
/// Name: Connor Siri
/// Period: 7
/// Program Name: Dumb
/// File Name: Dumb.java
/// Date Finished: 9/24/2015
import java.util.Scanner;
class Dumb{
public static void main(String[] args) {
double num1, num2, num3, product;
Scanner keyboard = new Scanner(System.in);
System.out.print( "What is your first number? " );
num1 = keyboard.nextDouble();
System.out.print( "What is your second number? " );
num2 = keyboard.nextDouble();
System.out.print("What is your third number? ");
num3 = keyboard.nextDouble();
product = (num1 + num2 + num3)/2;
System.out.println( "( " + num1 + " + " + num2 + " + " + num3 + " ) / 2 is... " + product);
}
}
Picture of the output