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

Write an algorithm to find the average of three numbers: 10, 20, 30

Computers and Technology
1 answer:
STALIN [3.7K]3 years ago
3 0

Language: JavaScript

Answer:

let num = [10,20,30];

average(num);  

function average(num) {

 let sum = 0;

 for(let i in num) {

   sum += num[i];

 }  

 return console.log(sum/num.length);

}

You might be interested in
Write a program that estimates how many years, months, weeks, days, and hours have gone by since Jan 1 1970 by calculations with
Rzqust [24]

Answer:

Explanation:

The following code is written in Java. It uses the LocalDate import to get the number of seconds since the epoch (Jan 1, 1970) and then uses the ChronoUnit import class to transform those seconds into years, months, weeks days, and hours. Finally, printing out each value separately to the console. The output of the code can be seen in the attached picture below.

import java.time.LocalDate;

import java.time.temporal.ChronoUnit;

class Brainly {

   public static void main(String[] args) {

       LocalDate now = LocalDate.now();

       LocalDate epoch = LocalDate.ofEpochDay(0);

       System.out.println("Time since Jan 1 1970");

       System.out.println("Years: " + ChronoUnit.YEARS.between(epoch, now));

       System.out.println("Months: " + ChronoUnit.MONTHS.between(epoch, now));

       System.out.println("Weeks: " + ChronoUnit.WEEKS.between(epoch, now));

       System.out.println("Days: " + ChronoUnit.DAYS.between(epoch, now));

       System.out.println("Hours: " + (ChronoUnit.DAYS.between(epoch, now) * 24));    

   }

}

6 0
2 years ago
The _ are the devices that allow a computer system to communicate and interact with the outside world as well as store informati
padilas [110]

Answer:

I think the answer is the central processing unit. Hope it helps!!!!!

5 0
3 years ago
9. Select the correct answer.
mihalych1998 [28]

Answer:

I believe the answer is exclusive but im not 100% sure

5 0
3 years ago
A formal log-on procedure is the operating system’s last line of defense against unauthorized access.
Elina [12.6K]
The answer is A. true
7 0
3 years ago
Please help me I don’t know what I’m doing wrong.
Alinara [238K]

Answer:

Explanation:

I noticed the \n, \n will cause the new line break, delete it.

try code below:

<em>System.out.println(" " + " " + "NO PARKING");</em>

<em>System.out.println("2:00 - 6:00 a.m.");</em>

5 0
2 years ago
Other questions:
  • 1. The graphical representation of the users character of alter ego is their:
    11·1 answer
  • The Modified Greiss chemical test is used to detect the presence of what chemicals that indicate muzzle to target distance?
    11·1 answer
  • Deterime the minimum number of multiplication operations needed to compute the following. Show the order of the computations.
    10·1 answer
  • Write a class called Person that has two data members - the person's name and age. It should have an init method that takes two
    12·1 answer
  • Which of the following is true of binary files?
    6·2 answers
  • What are some things all boomers say.
    12·2 answers
  • Explain how files can be identified as entities on the magnetic surface?
    8·1 answer
  • Text Questions
    15·1 answer
  • I WILL MARK IT BRAINLIEST FOR SURE ☺️❤️
    13·1 answer
  • How to automatically forward text messages to another phone iphone.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!