Allan Didier

Number Variables

Goals

Write a Java program that reads from the console, saves the input to a variable, does some calculations, and prints to the console. 

Skills

  • Input and Strings
  • Variables
  • Operators

Program Details

PP 2.4 page 109

Write an application that reads two floating point numbers from the console and prints their sum, difference, and product. Make sure your output clearly explains which numbers are the sum, difference and product.

Resources

Java Textbook

Java Textbook: Chapter 2, Data and Expressions

Bill Barnum's AP Computer Science A videos