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
77julia77 [94]
4 years ago
7

Write a Program that uses the method sqrt. of the class Math and outputs the square roots of the first 25 positive integers. (Yo

ur program must output each number and its square root.)
Computers and Technology
1 answer:
LenKa [72]4 years ago
6 0

Answer:

The program to this question can be given as:

Program:

import java.lang.*;

class root    //define class  

{

int i;         //define variable

public void Squareroot()

 //define function

{

System.out.println("Number\tsquare root"); //print message.  

for(i=1;i<=25;i++)                  //use for loop

 {

  System.out.println(i+"\t"+Math.sqrt(i));  //print value and using square root function

 }

}

}

public class Main      //define class  

{

   public static void main(String[] ar)      //define main method

{

root ob= new root();   //create class object

ob.Squareroot();

 calling function

}

}

output:

Number   Square Root

1                    1.0

2                   1.414

3                   1.732

4                   2.0

5                   2.236

.

.

.

24                 4.898

25                 5.0    

Explanation:

In the above program firstly we declare a class that is root. In this class, we declare a variable(i) and function(Squareroot). In the function, we define a loop that uses the variable to print all the values. In the loop, we use the math square root function that is sqrt. This function is bind in java package i.e java.lang.*; This function returns square root that's value type is double. Then we define a main class in the main class we define the main function in the main function we create a root class object and call the function.

You might be interested in
Chapter 21 discusses four aspects of the speaking situation you should take into account when planning the graphics you'll use i
choli [55]

Answer:

The answer is "audience aptitude and experience "

Explanation:

The presentation is the ability to provide a variety of audiences with successful and stimulating interactions. The main objective of an oral presentation is to talk formally to a live audience about a particular subject. You have to write an oral speech that engages the audience and fulfills your goals.

In this type of presentation, the Listener-centric concept is effective as the productivity of a speaker is enhanced by creating and presenting the speech throughout the proper manner.

6 0
3 years ago
How would you write out the Python code to PRINT the answer to 5 times 2?
Gwar [14]

I dont this this is the place to ask

6 0
2 years ago
Ingrid started speaking about her slide presentation. When she clicked to th
german

Answer: B add presenters notes

8 0
3 years ago
Read 2 more answers
Source Code for TF2 - Please insert it here
Advocard [28]

Answer:

Hi T!

Explanation:

How are you?

3 0
3 years ago
Software development team leaders need (blank)<br> skills to excel in directing their teams.
sattari [20]

This is a very tricky question since I do not have multiple choices I can choose from. However, software development team leaders or project managers enhanced leadership/management skills. They should also be flexible and focused on business values. They should be able to have people skills and be able to build and maintain excellent relationships with team members.








4 0
4 years ago
Other questions:
  • What do you think is the most fascinating aspect of the internet?
    14·1 answer
  • Give an example of movies or games that use teleportation
    11·1 answer
  • Write a program that reads in characters from standard input and outputs the number of times it sees an 'a' followed by the lett
    11·1 answer
  • Role of computers in everyday life​
    15·1 answer
  • If you convinced your teacher to give you an extension on an assignment, what would this situation be an example of? OA. General
    8·1 answer
  • Select the true statement about the motherboard.
    9·1 answer
  • Topic: Video Games
    15·1 answer
  • The value that decides whether something falls into one category or another is called a ____
    13·1 answer
  • A ____________________ machine is used to gather or arrange in their proper sequence.
    9·1 answer
  • Becuase privacy is personal customers, where should your data privacy efforts align?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!