Tuesday

March 31, 2015

March 31, 2015

Posted by **Susie** on Friday, May 28, 2010 at 7:25am.

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)

- computer science -
**MathMate**, Friday, May 28, 2010 at 8:17am1. 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.

**Answer this Question**

**Related Questions**

Computer Science - Hi can you guys help me with these output code, I think you ...

Part 1 - Consider the following selection statement where X is an integer test ...

programming - Consider the following selection statement where X is an integer ...

Java programming - can anybody help me.. Multidimensional Array Use a two-...

calculus - i have a problem figureing out this question do you have any help? ...

Math - Hey, I need your help! I have an input output table that I need the ...

Microeconomics - Oligopoly - Two firms decide to form a cartel and collude in a ...

Part 1 - input X if (0 <= X and X < 49) output "you fail" else if (50 <...

Computer Science - I need help with this problem. I don't know how to set it up ...

Economics - In the short run a firm needs six units of labor to produce eight ...