gtadayukey / PracticalActivityFibonacci

This repository contains three C language programs: monolithic, iterative and recursive, each calculating the Fibonacci sequence. I used the Trace Machine method to identify strong equivalence between the programs. The source code and presentation used in the classroom are available here.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PracticalActivityFibonacci

  • This repository is about a College Project that contains three C language programs: monolithic, iterative and recursive, each calculating the Fibonacci sequence. I used the Trace Machine method to identify strong equivalence between the programs. The source code and presentation used in the classroom are available here.

Instruction

  • Present simple programs (with the same function) of each type: Monolithic, Iterative and Recursive;
  • Apply the Trace Machine (MT) method in order to identify strong equivalence between the implemented programs. Based on the chain generated by MT, present an example of equivalence and another of non-equivalence;
  • The team have the choice to choose any programming languages, as well as their functionality (what they do). For monolithic programs, the C language is recommended (use of the goto command);
  • The finished work must be presented in the classroom, with the following requirements met: Description and Execution of the Program, presentation of examples of computed functions involving the implemented programs;

Fibonacci Overview

  • The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, starting with 0 and 1.

Explanation of the Sequence:

  • The sequence starts with 0 and 1, and each subsequent number is the sum of the two previous ones. So, it goes like this: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, and so on, infinitely.

Properties and Applications:

  • The ratio of consecutive Fibonacci numbers approaches the golden ratio (approximately 1.6180339887).
  • It's seen in nature (leaf arrangements, branching of trees).
  • Useful in mathematics (number theory) and computer science (algorithms).

About

This repository contains three C language programs: monolithic, iterative and recursive, each calculating the Fibonacci sequence. I used the Trace Machine method to identify strong equivalence between the programs. The source code and presentation used in the classroom are available here.


Languages

Language:C 100.0%