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
riadik2000 [5.3K]
3 years ago
14

Write an algorithm to find the average of six numbers​

Computers and Technology
1 answer:
slavikrds [6]3 years ago
7 0

Answer:

Input: two numbers x and y Output: the average of x and y Step 1 : input x,y Step 2: sum=0,average=0 Step 3:sum = x + y Step 4:average = sum /2 Step 5: print average.

Explanation:

Input: two numbers x and y Output: the average of x and y Step 1 : input x,y Step 2: sum=0,average=0 Step 3:sum = x + y Step 4:average = sum /2 Step 5: print average.

You might be interested in
Where Can I Get Actual Microsoft AZ-900 Exam Questions?
Pachacha [2.7K]

Answer:

Pls check the site "examtopics"

U fill find ur questions there

8 0
4 years ago
Write a program that reads the lengths of the sides of a triangle from the user. Compute the area of the triangle using Heron's
slamgirl [31]

Answer:

The java program is as follows.

import java.util.Scanner;

import java.lang.*;

public class Area

{

   //variables to hold the values

   static double a, b, c;

   static double s;

   static double area;

public static void main(String[] args) {

    //scanner class object created

    Scanner sc = new Scanner(System.in);

 System.out.print("Enter the first side: ");

 a=sc.nextInt();

 System.out.print("Enter the second side: ");

 b=sc.nextInt();

 System.out.print("Enter the third side: ");

 c=sc.nextInt();

 s=(a+b+c)/2;

 //function of Math class used

 area = Math.sqrt( s*(s-a)*(s-b)*(s-c) );

 //result displayed with 3 decimal places

 System.out.printf("The area of the triangle is %.3f", area);  

}

}

OUTPUT

Enter the first side: 1

Enter the second side: 1

Enter the third side: 1

The area of the triangle is 0.433

Explanation:

1. The variables to declare the three sides of the triangle, the semi-perimeter and the area of the triangle are declared with double datatype. All the variables are declared at class level and hence, declared with keyword, static.  

2. Inside main(), an object of the Scanner class is created.

Scanner sc = new Scanner(System.in);

3. Using the Scanner class object, user input is taken for all the three sides of the triangle.

4. Following this, the semi-perimeter is computed as shown.

s=(a+b+c)/2;

5. The area of the triangle is computed using the given formula which is implemented as shown.

area = Math.sqrt( s*(s-a)*(s-b)*(s-c) );

6. The sqrt() method of the Math class is used while computing the area of the triangle.

7. The area is displayed with three decimals. This is done using the printf() method as shown.

System.out.printf("The area of the triangle is %.3f", area);

8. The program is saved with the same name as the name of the class having the main() method.

9. The class having the main() method is always public.

3 0
3 years ago
You would like to search for information about storms but not tornadoes. What type of search strategy may be useful?
Helen [10]

Answer:One of the most interesting comments regards 'stemming': "Some of the search engines offering wildcard search also support what is called "stemming." That means they will find terms like "singing" even if you only enter "sing." This also means you may not need to use a wildcard symbol."

Explanation:

3 0
3 years ago
Read 2 more answers
The term which refers to the attempt to gain unauthorized access to systems and computers used bya telephone company to operate
Alex787 [66]

Answer: Phreaker

Explanation:

Phreaker is defined as the unauthorized attack on  authorized communication system for stealing and manipulation phone networks.

  • Exploring,searching and identifying telecommunication field with help of technologies,equipment,tools etc is done to exploit the system and resources .
  • Other options are incorrect because phone hacking is attacking phone device, [email protected] is also hacking source and hacktivist hacks system to impact social and political field.
  • Thus, the correct option is option(d)
8 0
3 years ago
The K-Means algorithm terminates when:_______
gavmur [86]

Answer:

b. the cluster centers for the current iteration are identical to the cluster centers for the previous iteration.

Explanation:

K-mean algorithm is one of the mot widely used algorithm for partitioning into groups of k clusters. This is done by partitioning observations into clusters which are similar to each other. When using k-mean algorithm, each of the different clusters are represented by their centroid and each point are placed only in clusters in which the point is close to cluster centroid.

The K-Means algorithm terminates when the cluster centers for the current iteration are identical to the cluster centers for the previous iteration.

7 0
4 years ago
Other questions:
  • The Circular Flow Model includes serveral actors. Which of the following is NOT listed in the Circular Flow Model?
    12·1 answer
  • What is an entity? An attribute?
    13·1 answer
  • vehicles power system is disabled as the result of a collision, can an ACN system using a paired cell phone work to notify a PSA
    7·1 answer
  • The third generation of computers was marked by the introduction of ____.
    8·1 answer
  • Can someone answer this ?
    7·1 answer
  • Write a program that calculates the average of 4 temperatures. Function 1--write a function to ask a user for 4 temperatures and
    10·1 answer
  • Select the correct navigational path to edit the name of a cell range using name manager
    12·2 answers
  • How to beat level 50 in give up robot 2
    5·1 answer
  • A wide-angle lens corrected for barrel distortion is called a(n)<br> lens.
    5·1 answer
  • You would like the word "Employee" to appear in cells A1, B1, C1, D1, and E1. To be efficient, you should
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!