1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
creativ13 [48]
4 years ago
11

Write, compile and test (show your test runs!) program that calculates and returns the fourth root of the number 81, which is 3.

Your program should make use of the sqrt() method. Math.sqrt(number).

Computers and Technology
1 answer:
lys-0071 [83]4 years ago
5 0

Answer:

I am writing a JAVA program. Let me know if you want the program in some other programming language.

public class FourthRoot{ //class to calculate fourth root of 81

public static void main(String[] args) { //start of main() function body

   double square_root; //declares to hold the fourth root of 81

   double number=81; // number is assigned the value 81

/* calculates the fourth root of number using sqrt() method twice which means sqrt() of sqrt(). This is equivalent to pow(number,(0.25)) where pow is power function that computes the fourth root by raising the number 81 to the power of 0.25 which is 1/4 */

   square_root=Math.sqrt(Math.sqrt(number));

//displays the fourth root of 81 i.e. 3

     System.out.println("Fourth Root of 81 is "+ square_root); } }

Explanation:

The program is well explained in the comments given along with each statement of the program . Since it was the requirement of the program to user Math.sqrt() method so the fourth root of number= 81 is computed by taking the sqrt() of 81 twice which results in the fourth root of 81 which is 3.

So the first sqrt(81) is 9 and then the sqrt() of the result is taken again to get the fourth root of 81. So sqrt(9) gives 3. So the result of these two computations is stored in square_root variable and the last print statement displays this value of square_root i.e. the fourth root of number=81 which is 3.

Another way to implement the program is to first take sqrt(81) and store the result in a variable i.e. square_root. After this, again take the sqrt() of the result previously computed and display the final result.

public class FourthRoot{

   public static void main(String[] args) {

   double square_root;

   double number=81;

   square_root=Math.sqrt(number);

  System.out.println("Fourth Root of 81 is: "+ Math.sqrt(square_root)); } }

The program along with its output is attached in a screenshot.

You might be interested in
GRAND THEFT AUTO 5 LOLLL
omeli [17]

Answer:

facts

Explanation:

8 0
3 years ago
Read 2 more answers
what impact of information communication technology have on the environment about electronic waste, use of electricity?​
hram777 [196]

Answer:

When e-waste is exposed to the heat, toxic chemicals are released into the air damaging the atmosphere.

Explanation:

6 0
2 years ago
You can upgrade a cpu by adding registers and cache memory to it. <br> a. True <br> b. False
sesenic [268]
False, to upgrade a CPU, you need to replace the CPU with a better CPU.
8 0
4 years ago
One of the attributes in a table in your database depends on another attribute for its meaning. What type of dependency has been
posledela
We call it functional dependencies.

A functional dependency which is also commonly known as a database dependency occurs in a database when info stored in the same database determines other information stored in the same table. Knowing the value of a set of attribute is enough to tell you the value of another set of attributes.



5 0
4 years ago
50 POINTS! What can be viewed in the Tasks folder? Check all that apply.
Rom4ik [11]

1, 2, and 4 :))) good luck

6 0
3 years ago
Read 2 more answers
Other questions:
  • What is “centrifugal bumble puppy”? why is it important for games to require a complicated apparatus?
    10·2 answers
  • When you copy a formula that contains an absolute reference to a new location, the reference ____. a. has a dotted outline in it
    6·1 answer
  • Explain in a few sentences the difference between analytical papers and argumentative papers.
    8·2 answers
  • Consider the classes below: public class TestA { public static void main(String[] args) { int x = 2; int y = 20 int counter = 0;
    8·1 answer
  • What is the computer that is similar to a destop but smaller in size
    8·1 answer
  • Which of the following allows the transmission of voice and often video communication over the internet?
    12·1 answer
  • When backing up a database, what is added to the file name?<br> On g metrix
    9·1 answer
  • Python will ignore any line of code that begins with hashtag true or false​
    13·2 answers
  • Write a pseudocode that receives a positive number from the user, and then,
    14·1 answer
  • assuming the default gateway is connected to the internet, what type of internet access would this server have?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!