Assignment #25
Code
/// Gian Adoremos
/// Period: 7
/// Program Name: TwentyFourth Program
/// File Name: DumbCalculator.java
/// Date Finished: 10/2/2015
import java.util.Scanner;
public class DumbCalculator
{
public static void main (String[] args)
{
Scanner keyboard = new Scanner(System.in);
float n1,n2,n3;
{
System.out.println();
System.out.print("First number please. ");
n1 = keyboard.nextFloat();
System.out.println();
System.out.print("Second number please. ");
n2 = keyboard.nextFloat();
System.out.println();
System.out.print("Third number please. ");
n3 = keyboard.nextFloat();
System.out.println();
System.out.print("Here are your calculations: ("+n1+" + "+n2+" + "+n3+" ) / 2 = "+( (n1+n2+n3)/2 ) );
}
}
}
Picture of the output