Question: In JAVA - (JAVA) Exercise #2: Design and implement a programming (name it SimpleMath) that reads two floating-point numbers (say R and T) and prints
In JAVA -
(JAVA) Exercise #2: Design and implement a programming (name it SimpleMath) that reads two floating-point numbers (say R and T) and prints out their values, sum, difference, and product on separate lines with proper labels. Comment your code properly and format the outputs following these sample runs.
Sample run 1:
R = 4.0 T = 20.0 R + T = 24.0 R - T = -16.0 R * T = 80.0
Sample run 2:
R = 20.0 T = 10.0 R + T = 30.0 R - T = 10.0 R * T = 200.0
Sample run 3:
R = -20.0 T = -10.0 R + T = -30.0 R - T = -10.0 R * T = 200.0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
