Data update
This commit is contained in:
parent
29a5eea0d4
commit
5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions
14
Task/Jensens-Device/Dart/jensens-device.dart
Normal file
14
Task/Jensens-Device/Dart/jensens-device.dart
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
double i = 0;
|
||||
double sum(int lo, int hi, double Function() term) {
|
||||
double temp = 0;
|
||||
for (i = lo.toDouble(); i <= hi; i++) temp += term();
|
||||
return temp;
|
||||
}
|
||||
|
||||
double termFunc() {
|
||||
return 1.0 / i;
|
||||
}
|
||||
|
||||
void main() {
|
||||
print(sum(1, 100, termFunc));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue