# How to fill a 2D array with factors of a number positive and negative?

Page 1 of 1

## 1 Replies - 182 Views - Last Post: 05 December 2017 - 04:22 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'https://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=408043&amp;s=92ba7da2fbc6d7c146abc6037463dd11&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 KingstonP

Reputation: 0
• Posts: 1
• Joined: 05-December 17

# How to fill a 2D array with factors of a number positive and negative?

Posted 05 December 2017 - 03:59 PM

I need to write a quadratic trinomial factoring program but need to find the factors of the constant term, could be any number. This is my fist assignment on 2-D arrays and I know how to do the factoring part but stuck on filling the array with the factors of the constant term. For example I'm looking to accomplish,
[15 ] [1 ]
[5 ] [3 ]
[-15] [-3]
[-5 ] [-3]

This would be what I am trying to accomplish if the constant term was 15.

Is This A Good Question/Topic? 0

## Replies To: How to fill a 2D array with factors of a number positive and negative?

### #2 g00se

• D.I.C Lover

Reputation: 3562
• Posts: 16,236
• Joined: 20-September 08

## Re: How to fill a 2D array with factors of a number positive and negative?

Posted 05 December 2017 - 04:22 PM

Quote

I know how to do the factoring part