mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
新增代码文件支持行号显示
This commit is contained in:
13
pub/code_field-master/example/lib/readme/fib.dart
Normal file
13
pub/code_field-master/example/lib/readme/fib.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
// An expensive but pretty
|
||||
// recursive implementation
|
||||
int fibonacci(int n) {
|
||||
if (n <= 1) return n;
|
||||
return fibonacci(n - 1)
|
||||
+ fibonacci(n - 2);
|
||||
}
|
||||
|
||||
void main() {
|
||||
print("Fibonacci sequence:");
|
||||
for (var n = 0; n < 10; n++)
|
||||
print(fibonacci(n));
|
||||
}
|
||||
Reference in New Issue
Block a user