Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 loop, and 1 selection Below are a list of sequences of numbers. Your job is to program each sequence with any loop of your

1 loop, and 1 selection

Below are a list of sequences of numbers. Your job is to program each sequence with any loop of your preference (while, for, do/while). I want the code to output the sequence provided and the next number in the sequence (you can output more but there is 1 sequence that may only have 1 number after). Each sequence should be in the same main in one .cpp file. Your submission should be a .cpp file. Please order and notate each sequence in your output if you skip one for whatever reason, output the series number and leave the rest blank. The output should also be horizontal like that shown below (if you output it vertically it will be -10pts). Each sequence should be programed with only 1 loop and optionally 1 selection statement. Hint: a selection statement may be used for the last 3 problems.

Series 1:

15, 14, 13, 12, 11, ...

Series 2:

1, 2, 5, 14, 41, ...

Series 3:

2, 3, 5, 8, 12, 17, ...

Series 4:

1, 2, 5, 26, 677, ...

Series 5:

10, 5, 1, -2, -4, -5, -5, -4, -2, ...

Series 6:

1, 8, 27, 64, 125, 216, ...

Series 7:

0, 1, 3, 7, 15, 31, 63, ...

Series 8:

0, 1, 4, 13, 40, 121, ...

Series 9:

15, 29, 56, 108, 208, 400

series 10: (finite)

0, 1, 3, 6, 10, 10, 11, 13, 16, 16, 17, 19, 19, ...

series 11:

7, 9, 14, 20, 27, 33, 42, 52, 63, 73, 86, ...

Series 12:

13, -21, 34, -55, 89 ...

Series 13:

0, 1, 4, 12, 32, 80, 192, ...

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 19th International Conference Dexa 2008 Turin Italy September 2008 Proceedings Lncs 5181

Authors: Sourav S. Bhowmick ,Josef Kung ,Roland Wagner

2008th Edition

3540856536, 978-3540856535

More Books

Students also viewed these Databases questions

Question

1. Explain how technology has changed the learning environment.

Answered: 1 week ago