# computer science

Hi I have 3 output problems that I need assistance, thank you!

Produce Output
For each problem, you are to produce the code, in JAva, to create the following output to the screen.

1.
+
+++0
++++++00
++++++++++000
... (this pattern continues forever)

2.
5 6 7 8 9 10
5 7 9 11 13 15
5 8 11 14 17 20
... (the pattern continues forever)

3.
0 2 4 6 8 10
1 3 5 7 9 11
3 5 7 9 11 13
6 8 10 12 14 16
... (pattern continues forever)

1. 👍
2. 👎
3. 👁
1. 1. It's the Pascal's triangle, namely
1,3,6,10,15...
or
1
+2=3
+3=6
+4=10
+5=15....

2.
The pattern is
5,6,7, ( add 1 to get the next number)
5,7,9...(add 2 to get the next number)
5,8,11,....(add 3 to get the next number)

3. It's a combination of 1 and 2:
Note the first column is 0,1,3,6,10, the numbers we did previously. Then add 2 to make the second column, 2,3,5,8,12...
and so on.

1. 👍
2. 👎

## Similar Questions

1. ### math

9. which set of output values correctly completes the function table? y=6-x input (X) output (y) -2 ? -1 ? 3 ? ----------------------- 4,5,3 -8,-7,3 8,7,3 11. What is the function rule shown by the table? input(x) output(y) -2 -3

2. ### Math

identify the function rule from the values in the table. input | output -1 | -2 0 | -1 1 | 0 2 | 0 A. output equals input times 2. B. output equals input minus 1. C. output equals input times -1. D. output equals input minus 2.

3. ### Physics

Compared to yesterday you did 3 times the work in one third the time. To so so your power output must have been: a) the same as yesterday's power output b)one third of yesterday's power output c)3 times yesterday's power output

4. ### Economics

Two firms produce the same good and compete against each other in a Cournot market. The market demand for their product is P = 204 - 4Q, and each firm has a constant marginal cost of \$12 per unit. MR1 = 204 - 8q1 - 4q2. Let q1 be

1. ### Math

Hey, I need your help! I have an input output table that I need the function rule for. The table is like this: Input: 0 Output: 25 Input: 100 Output: 35 Input: 200 Output: 45 Input: 300 Output: 55 Input: 400 Output: 65 PLEASE I

2. ### Math

9. which set of output values correctly completes the function table? y=6-x input (X) output (y) -2 ? -1 ? 3 ? ----------------------- 4,5,3 -8,-7,3 8,7,3 11. What is the function rule shown by the table? input(x) output(y) -2 -3

3. ### Managerial ECON

Suppose that a firm is currently employing 20 workers, the only variable input, at a wage rate of \$60. The average product of labor is 30, the last worker added 12 units to total output, and total fixed cost is \$3,600. a. What is

4. ### Economic

Suppose that labor is the only input used by a perfectly competitive firm that can hire workers for \$50 per day. The firm’s production function is as follows: Days of Labor/Units of Output: 0/0, 1/7, 2/13, 3/19, 4/25, 5/28,

1. ### Computer Science

What is the rule for this function? input 1 output 2 input 2 output 5 Input 3 output 12 Input 4 output 34 Input 5 output 135 Input 6 output 741

2. ### physics

If a simple machine provides an increased output force, what happens to the output distance? Can someone please help

3. ### Math

identify the function rule from the values in the table input; -1,0,1,2 output; -2,-1,0,1 output equals input times 2 output equals input minus 1 output equals input times -1 output equals input minus 2

4. ### math

The weights and heights of six mathematics students are given in the following table: Weight (in pounds) Height (in centimeters) 165 172 123 157 212 183 175 178 165 163 147 167 In the statement, "Height is a function of weight,"