Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program called UseMath. It should contain a class called UseMath that contains the method main. The program should ask for two double numbers
Write a program called UseMath. It should contain a class called UseMath that contains the method main. The program should ask for two double numbers from the user and then print the information shown in the examples below. Use printf to display only 2 digits to the right of the decimal point. Look at the examples below and write your program so it produces the same input/output.
(the input from the user is in bold face) % java UseMath enter a double number: 1 enter another double number: 2 the absolute value of your first number is: 1.00 the cube root of your second number is: 1.26 the square root of your first number is: 1.00 the log base 10 of your second number is: 0.00 the greater of your two numbers is: 2.00 the smallest of your two numbers is: 1.00 1.00 to the power of 2.00 is 1.00 % java UseMath enter a double number: 2.0 enter another double number: 3.0 the absolute value of your first number is: 2.00 the cube root of your second number is: 1.44 the square root of your first number is: 1.41 the log base 10 of your second number is: 0.30 the greater of your two numbers is: 3.00 the smallest of your two numbers is: 2.00 2.00 to the power of 3.00 is 8.00 % java UseMath
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started