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
Is hacking always wrong? Creating viruses?
nalin [4]

Answer:

yes

Explanation:

6 0
2 years ago
Read 2 more answers
Which of these best describes augmented reality?
Mandarinka [93]
Integrating 3D graphics to provide a live, direct, or indirect view of a physical real-world
3 0
3 years ago
Running the Disk Cleanup utility is a quick way to ________. Group of answer choices defrag your hard drive remove spyware progr
grigory [225]

Answer:

Clear out any garbage file on the drive

Explanation:

7 0
3 years ago
You've been asked to set up a temporary Internet cafe for a conference your company is hosting. You have ten laptops to use in y
kolbaska11 [484]

Answer: Cable Locks

Explanation:

  • The cable locks is one of the type of secure device that helps in physically secure the various types of laptops and computer system.
  • The cable lock helps the devices and the confidential information to prevent from theft and it is also known as the versatile security system.  
  • The cable lock is basically warp up in the form of metal cable and we usually insert the this cable lock into the laptop device slot in the system.  

  According to the given question, The cable lock is typically used in the laptop devices that protect and physically secure from the hacking purpose and it is used in the various types of deices such as printers, electronic devices and the laptops.  

7 0
3 years ago
Which field in a Transmission Control Protocol (TCP) header provides the next<br> expected segment?
Papessa [141]

In a Transmission Control Protocol (TCP) header next  Expected segment is provided by Acknowledgment Number

Explanation:

  • TCP is one of the main protocols of the Internet protocol suite. It originated in the initial network implementation in the Internet Protocol.
  • The fields in TCP Segment Header are Source Port, Destination Port, Sequence Number, Acknowledgement Number, Header Length, Flags, Window Size, TCP Checksum and Urgent Pointer.
  • The Acknowledgment Number is a  32 Bit number field which indicates the next sequence number that the sending device is expecting from the other device.
  • The SYN packets consume one sequence number, so actual data will begin at ISN+1. The sequence number is the byte number of the first byte of data in the TCP packet sent.
  • If the acknowledgment flag is set in the flags field, the acknowledgment number field holds the sequence number of the next byte that the receiver expects.
3 0
4 years ago
Other questions:
  • Which option enables you to keep the last grammatical change
    15·2 answers
  • A security system uses sensors at every door and window which will set off an alarm if any one of them is opened. There is also
    9·1 answer
  • _______ are created under ________, similar to how you create individual files within a broader file folder
    9·2 answers
  • A company uses DHCP servers to dynamically assign IPv4 addresses to workstations. The address lease duration is set as 5 days. A
    6·1 answer
  • How to download goose simulator the game for free<br><br>pls tell me
    6·2 answers
  • Write an expression that computes the difference of the variables x and y on Python.
    5·1 answer
  • Dis-cord and/or snap????????????? Im 13 ! and a girl :)))))
    12·2 answers
  • Throughout the lecture, the teacher speaks about the defintion of "Science"
    5·2 answers
  • Display the Approval Form worksheet and create an IF statement in cell B13 to determine if the applicant is eligible for a perso
    7·1 answer
  • Five real world objects with similar characteristics​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!