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
choli [55]
3 years ago
13

Write a function, factors, that takes an integer n, and returns a list of values that are the positive divisors of n. Note: 0 is

not a divisor of any integer, 1 divides every number, and n divides itself.
Computers and Technology
1 answer:
Helen [10]3 years ago
4 0

Answer:

public int[] factors(int n)

{

int arr[]=new int[n];

int count=0;

for(int i=1;i<=n;i++)

if(n%i==0)

{

arr[count]=i;

count++;

}

return arr;

}

Explanation:

Factors are the numbers you multiply to get another number. For instance, factors of 15 are 3 and 5, because 3×5 = 15.

In the program , we have an array of length N to store the factors.

Since we don't know the number of factors of N, so we have taken size of upper bound N to store list of factors in the array arr.

Within the loop the number gets divide by Integers from 1 to that number until result is 0. If it is 0, that number is stored in array.

You might be interested in
It keeps saying “something is going wrong oops!” when i click on my brainly notifications what do I do
AveGali [126]

Answer:

check your app permissions it may be blocking them or try resetting the app

4 0
3 years ago
are the network administrator for your company. You are installing a new printer in the network. When you check the print server
melamori03 [73]

Answer:

Will have to run the net start spooler command.

Explanation:

  • The printer spooler seems to be accountable for overseeing incoming faxes that have been in effect intended for handling by the printer. Whether this device stops operating, your printer won't publish documentation as well as the machine may not notice it either.
  • To solve these problems, you'll need to run the net start spooler command using the least administrative effort.
5 0
2 years ago
Which command should you use to display both listening and non-listening sockets on your linux system? (tip: enter the command a
trasher [3.6K]

Answer: netstat -a

Explanation: The netstat -a command displays both listening and non-listening sockets.

3 0
1 year ago
Information posted online can be deleted in some cases, but why would it be difficult to know if it is really gone?
lidiya [134]

Answer:

b

I need I Brainliest

5 0
2 years ago
Because its radio waves can pass through walls or desktops,
jeka57 [31]
Bluetooth i believe, not too sure however but its ur best bet
5 0
2 years ago
Other questions:
  • According to Mintzberg's classification of managerial roles, the role of a(n) ______ is to transmit information received from ou
    7·1 answer
  • The encapsulation unit on the presentation layer of the osi model is
    10·1 answer
  • How did tafts accomplishments regarding conservation and trust-busting compare to roosevelt?
    11·1 answer
  • Encapsulation is the process of “packaging” information prior to transmitting it from one location to another. true or false
    14·1 answer
  • A client contacted you to request your help in researching and supplying the hardware necessary to implement a SOHO solution at
    9·1 answer
  • Kiara is using her software's graphic formats to create a line graph. As she
    9·2 answers
  • ______involves encoding information using fewer bits than the original representation Group of answer choices
    6·1 answer
  • A student opens a recently purchased software package and begins reading the enclosed materials. What information might be inclu
    6·1 answer
  • What do you call the quality of information
    5·1 answer
  • The project objective is the detailed description of the characteristics of the project. True or False?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!