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
Bond [772]
3 years ago
11

Write an enhanced for loop that multiplies all elements in an int[] array named factors, accumulating the result in a variable n

amed product. Numbers.java 123456789101112 public class Numbers{ public int multiply(int[] factors) { int product
Computers and Technology
1 answer:
IgorC [24]3 years ago
8 0

public class Numbers {

   public int multiply(int[] factors){

       int product = 1;

       for (int i : factors){

           product *= i;

       }

       return product;

   }

   public static void main(String[] args) {

       int [] factors = {1,2,3,4,5,6,7,8,9,10,11,12};

       Numbers num = new Numbers();

       System.out.println(num.multiply(factors));

   }

   

}

I hope this helps!

You might be interested in
Stored information about a previous visit to a web site is called information _____.
Nikitich [7]
The answer would be Cookies.
6 0
3 years ago
It is illegal to have __________ emergency lights on your vehicle.
Alexxx [7]

Answer is A. Red and Blue

This because these are the same color of emergency lights that are used on Emergency vehicles like ambulances, police cars, fire trucks, etc. We wouldn't want normal citizens confusing drivers with police officers in case of an actual emergency.

8 0
3 years ago
Read 2 more answers
g Given a 5 by 5 matrix of all positive values, write a program to find and display the greatest product of the 2 adjacent value
Rom4ik [11]

Answer:

Check the explanation

Explanation:

% iterate through each column (outer loop) , then iterate rows-1 (inner loop)

%take product of adjacent rows

mat = input('enter 5 by 5 matrix : ');

[R,C] = size(mat);

max_prod =0;

for c =[1:C]

for r=[1:(R-1)]

temp = mat(r,c)*mat((r+1),c);

if max_prod<temp

max_prod=temp;

end

end

end

fprintf('Greatest product : %i\n', max_prod)

Kindly check the output in the attached image below.

7 0
3 years ago
What does it mean to say that there is a relationship between two tables?
NeTakaya

Answer:

Definition

Explanation:

A database relationship is a situation between two relational database tables when one table has a foreign key that refers to the other table's primary key.

Relationships allow for the separation and storing of information in different tables when connecting disparate data objects.

4 0
3 years ago
How does computer applications affect our lives daily? 1- paragraph (4 sentences)
Mnenie [13.5K]

Answer:

Computers affect our lives daily because we use them everyday to browse the internet and solve problems in real life. They help solve problems and without them, getting certain information would be much harder. They help us interact with friends from anywhere in the world and communicate with relatives. It has also helped us during this pandemic and lets us learn from school in the safety of our own home.

( hope this helps, i wrote it myself ;-; )

4 0
3 years ago
Read 2 more answers
Other questions:
  • While configuring a new 802.11g wireless network, you discover another wireless network within range that uses the same channel
    13·1 answer
  • What is a device driver?
    9·2 answers
  • Jamie works on a spread sheet in which he has to label stes of data. How can he navigate between the cells in the spread sheet
    8·1 answer
  • After you enter the details for the first selected recipient in the New Address List dialog box, click _______ to add another re
    9·1 answer
  • Which encryption standard goes with the WPA2 protocol?<br> AES<br> DES<br> TKIP<br> WPS
    15·1 answer
  • A pointer is the memory address of a variable. FALSE TRUE
    9·1 answer
  • Please help me with this question<br>it on the picture​
    9·1 answer
  • Please please help ASAP it’s timed
    13·1 answer
  • 1. What are the main uses for Protein in the body?
    13·2 answers
  • Topic: Video Games
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!