Fibonacci in Dart

Published on 28 April 2022 (Updated: 18 September 2022)

Fibonacci in Dart

Welcome to the Fibonacci in Dart page! Here, you'll find the source code for this program as well as a description of how the program works.

Current Solution

void main(List<String> args) {
  try{
    int first = 0;
    int second = 1;
    int val = 1;
    for(int i=1; i<int.parse(args[0])+1; i++){
      print("${i}: ${val}");
      val = first+second;
      first = second;
      second = val;
    }
  }
  catch(e){
    print("Usage: please input the count of fibonacci numbers to output");
  }
}

Fibonacci in Dart was written by:

If you see anything you'd like to change or update, please consider contributing.

How to Implement the Solution

No 'How to Implement the Solution' section available. Please consider contributing.

How to Run the Solution

No 'How to Run the Solution' section available. Please consider contributing.