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
Please help me what is an example of a growing trend on social media
Marizza181 [45]

Answer:

B

Explanation:

8 0
3 years ago
A Floppy Disk is an example of:
lisov135 [29]

Answer:

B I think-

Explanation:

Its either Primary or Secondary :) pretty sure its secondary tho

6 0
3 years ago
1. Select two forms of case designed suitable for ATX power supply and
jekas [21]
The answer should be c
4 0
3 years ago
Technology is defined as human ________________ in action that involves the generation of knowledge and processes to develop sys
Alenkasestr [34]

Answer:

Innovation:

Explanation:

Technology is defined as human innovation in action that involves the generation of knowledge and processes to develop systems that solve problems and extend human capabilities.

To innovate is to make changes in something established, especially by introducing new methods, ideas, or products.

5 0
2 years ago
A single central register of IP addresses and names (a DNS style system) is an efficient means of translating human readable nam
Harrizon [31]

Answer:

True

Explanation:

DNS stands for "Domain Name System" DNS is the system/service that is used to convert the Domain Names into IP addresses.

Whenever we write a URL to go to a web page in our browser for example Brainly(dot)com, the request first goes to a server which converts the named URL(Brainly(dot)com) into actual IP address. This actual IP address is then used to reach to the web files, as response to the URL search. This system is made to ease out the searches made by the users.

Therefore, the given statement is True.

8 0
4 years ago
Other questions:
  • ____________________ memory is the ability to add RAM without shutting down the computer or operating system.
    13·1 answer
  • Write a program using integers user_num and x as input, and output user_num divided by x three times. Ex: If the input is: 2000
    15·1 answer
  • Which statement about tuition is the most accurate?
    11·2 answers
  • Business competition is no longer limited to a particular country or even a region of the world.
    10·1 answer
  • How to find out what version of windows i have?
    13·1 answer
  • Â A number of companies and/or agencies, such as National ____ and Atmospheric Administrationâs National Weather Service, provid
    9·1 answer
  • What does digital mean, in the term of computer science.
    11·1 answer
  • 15. The most efficient way to perform data entry is to keep your hands on the keyboard and press _______ to move to the next cel
    13·1 answer
  • Type the correct answer in the box. Spell the word correctly.
    15·2 answers
  • Which of the following is not a key component of a structure?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!