Assignemnt #25 A Dumb Calculator
Code
///Name: Prooz Fereydouni
///Period: 7
///Project Name: A Dumb Calculator
///File Name: ADC.java
///Date: 9/25/2015
import java.util.Scanner;
public class ADC
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
double firstNumber, secondNumber, thirdNumber, result;
System.out.print( "What is your first number?" );
firstNumber = keyboard.nextDouble();
System.out.print( "What is your second number?" );
secondNumber = keyboard.nextDouble();
System.out.print( "What is your third number?" );
thirdNumber = keyboard.nextDouble();
System.out.println( "" );
System.out.println( "" );
System.out.println( "" );
result = (firstNumber + secondNumber + thirdNumber) / 2;
System.out.println( "( " + firstNumber + " + " + secondNumber + " + " + thirdNumber + " ) / 2 is... " + result );
}
}
Picture of the output