Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Sudan-function/Dart/sudan-function.dart
Normal file
13
Task/Sudan-function/Dart/sudan-function.dart
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
int F(int n, int x, int y) {
|
||||
if (n == 0) {
|
||||
return x + y;
|
||||
} else if (y == 0) {
|
||||
return x;
|
||||
}
|
||||
|
||||
return F(n - 1, F(n, x, y - 1), F(n, x, y - 1) + y);
|
||||
}
|
||||
|
||||
void main() {
|
||||
print('F(1,3,3) = ${F(1, 3, 3)}');
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue