C# Assignment4A: Fibo-what? If you’ve never heard of the Fibonacci series, it’s an infinite series that occurs...

60.1K

Verified Solution

Question

Programming

C#

Assignment4A: Fibo-what? If you’ve never heard of the Fibonacciseries, it’s an infinite series that occurs everywhere in nature.It starts off with two digits – 0 and 1. To get the next value inthe series, you add the previous two values. In this case, thethird value is 0+1 = 1. The fourth value is 1+1 = 2, the fifth1+2=3 and so on, to give us a series like:

0, 1, 1, 2, 3, 5, 8, 13, 21, 34,...

I always wondered what it would look like if you changed thestarting values from 0 and 1 to some arbitrary (and if it wouldmatter). We’re going to do that here. Ask the user for a pair ofstarting values as well as a number of times to iterate the series,then produce the correct output. We recommend you use a FOR loopand use a sum variable.

For part 1 of this assignment, design pseudocode to solve thisproblem. When working on the source code, call the file nameAssignment4A(.java, .cs, .cpp) and the class name Assignment4A.When printing the next value in the series, print the comma first.The first two values are special cases for printing.

  

Sample Output #1: Enter seed 1:
5
Enter seed 2:

8

  Number of iterations:

10

5,8,13,21,34,55,89,144,233,377,610,987

Sample Output #2: Enter seed 1:
56
Enter seed 2:

78

  Number of iterations:

6

  56,78,134,212,346,558,904,1462

Answer & Explanation Solved by verified expert
4.1 Ratings (654 Votes)
SOLUTIONI have solve the problem in C code with comments and screenshotfor easy understanding    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students