Skip to content

mapgie/Algo-100-Appended-Fibonacci-Sum

Repository files navigation

Algo-100-Appended-Fibonacci-Sum

A C# Learning Exercise based on HSCTF 3 exercise Algo 100

This program will do the following:

  • Ask you to input an integer n
  • Return the first n numbers of the Fibonacci sequence
  • Append each Fibonacci number to the set of the previous, such as: 1, 11, 112, 1123, ... to a total of n numbers
  • Sum each of the appended numbers
  • Return the last 9 numbers of this sequence (provided n > 9). For the sake of a more interesting result, consider picking a number greater than 9. (I suggest 50).

Lessons

  • Asks user for input of a positive integer
  • Exception handling & catches number smaller than zero to re-prompt
  • Non-primitive types: classes, arrays, strings
  • Uses arithmetic
  • Assignment operators, comparison operators, logical operators
  • Explicit type conversion / casting
  • Generates Fibonacci sequence
  • do / while loops
  • foreach
  • if / else if / else
  • BigInteger

About

A C# Learning Exercise based on HSCTF 3 exercise Algo 100

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages