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
topjm [15]
3 years ago
15

This is not what I asked for​

Computers and Technology
1 answer:
jolli1 [7]3 years ago
3 0
?? What does that mean? What is the question
You might be interested in
Which of the following is a professional organization in the field of IT? Society for the Prevention of Cruelty to Animals (SPCA
Lelu [443]
(IEEE) Is the obvious answer ; no harshness meant in any way
7 0
3 years ago
Read 2 more answers
How do I turn on your asus chromebook flip?
galben [10]
I believe the charger has to be connected for it to turn on.
3 0
3 years ago
What happens if you have Param 1 in your ad, but there is no corresponding value at the keyword level?
nika2105 [10]
Without it, you at will no severe
4 0
3 years ago
Read 2 more answers
Write a program consisting of: a. A function named right Triangle() that accepts the lengths of two sides of a right triangle as
Lunna [17]

Answer:

The java program is as follows.

import java.lang.*;

public class Triangle

{

   //variables to hold sides of a triangle

   static double height;

   static double base;

   static double hypo;

   //method to compute hypotenuse

   static double rightTriangle(double h, double b)

   {

       return Math.sqrt(h*h + b*b);

   }

public static void main(String[] args) {

    height = 4;

    base = 3;

    hypo = rightTriangle(height, base);

 System.out.printf("The hypotenuse of the right-angled triangle is %.4f", hypo);

}

}

OUTPUT

The hypotenuse of the right-angled triangle is 5.0000

Explanation:

1. The variables to hold all the three sides of a triangle are declared as double. The variables are declared at class level and hence, declared with keyword static.

2. The method, rightTriangle() takes the height and base of a triangle and computes and returns the value of the hypotenuse. The square root of the sum of both the sides is obtained using Math.sqrt() method.

3. The method, rightTriangle(), is also declared static since it is called inside the main() method which is a static method.

4. Inside main(), the method, rightTriangle() is called and takes the height and base variables are parameters. These variables are initialized inside main().

5. The value returned by the method, rightTriangle(), is assigned to the variable, hypo.

6. The value of the hypotenuse of the triangle which is stored in the variable, hypo, is displayed to the user.

7. The value of the hypotenuse is displayed with 4 decimal places which is done using printf() method and %.4f format specifier. The number 4 can be changed to any number, depending upon the decimal places required.

8. In java, all the code is written inside a class.

9. The name of the program is same as the name of the class having the main() method.

10. The class having the main() method is declared public.

11. All the variables declared outside main() and inside another method, are local to that particular method. While the variables declared outside main() and inside class are always declared static in java.

4 0
3 years ago
What tag works as a dictionary between text & computer bytes?
Lynna [10]

Answer:

Here is some python code

Explanation

5 0
3 years ago
Other questions:
  • What type of installation should you perform if you want to install a 64-bit version of Windows on a computer that already has a
    8·1 answer
  • After the following code is executed what will be displayed on the screen? bool correntEmployee = true; double empSalary = 45000
    7·1 answer
  • What is a data broker?
    6·1 answer
  • One of the most common uses of spreadsheet programs are communicating with others. O editing images and photos. O tracking and m
    8·2 answers
  • How to get the home button on your screen?
    13·1 answer
  • A man-made world event that would affect the labor market would be a(n) _____.
    13·1 answer
  • The number of __________ to your website that had not visited prior to the time frame being analyzed.
    9·1 answer
  • Which of the following is the correct order of laws (from local to state to federal)
    6·1 answer
  • What is meant by reflection?​
    9·2 answers
  • In a typical office, biometric authentication might be used to control access to employees and registered visitors only. We know
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!