Devam Ediyor

500319 Generating Sequences With Recurrence Relations

Hi

I need to write a program containing recursive functions that will generate values of a recurrence relation and compare the growth to two possible given functions.

Sample Output

Enter a numeric value for A(0): 1

Enter a numeric value for A(1): 2

n A(n)=4A[n-1]-4A[n-2] 2^n 2.1^n

0 1 1 1

1 2 2 2.1

2 4 4 [url removed, login to view]

3 8 8 [url removed, login to view]

4 16 16 [url removed, login to view]

5 32 32 [url removed, login to view]

6 64 64 [url removed, login to view]

7 128 128 [url removed, login to view]

8 256 256 [url removed, login to view]

9 512 512 [url removed, login to view]

10 1024 1024 [url removed, login to view]

11 2048 2048 [url removed, login to view]

12 4096 4096 [url removed, login to view]

13 8192 8192 15447.2

14 16384 16384 32439.2

15 32768 32768 68122.3

16 65536 65536 143057

17 131072 131072 300419

18 262144 262144 630881

Enter a numeric value for A(0): 2

Enter a numeric value for A(1): 3

n A(n)=-A[n-1]+A[n-2] 1.5^n 1.8^n

0 2 1 1

1 3 1.5 1.8

2 -1 [url removed, login to view] [url removed, login to view]

3 4 [url removed, login to view] [url removed, login to view]

4 -5 [url removed, login to view] [url removed, login to view]

5 9 [url removed, login to view] [url removed, login to view]

6 -14 [url removed, login to view] [url removed, login to view]

7 23 [url removed, login to view] [url removed, login to view]

8 -37 [url removed, login to view] 110.2

9 60 [url removed, login to view] [url removed, login to view]

10 -97 [url removed, login to view] [url removed, login to view]

11 157 [url removed, login to view] [url removed, login to view]

12 -254 [url removed, login to view] [url removed, login to view]

13 411 [url removed, login to view] 2082.3

14 -665 [url removed, login to view] [url removed, login to view]

15 1076 [url removed, login to view] [url removed, login to view]

16 -1741 [url removed, login to view] 12144

17 2817 [url removed, login to view] 21859.1

18 -4558 [url removed, login to view] 39346.4

Beceriler: Her şey Kabul, C Programlama

Daha fazlasını görün: recursive programming, generating sequences recurrence relations, recursive, 2048, 411, 157, write recursive program, recursive program, recursive functions, numeric values

İşveren Hakkında:
( 3 değerlendirme )

Proje NO: #2246240