RosettaCodeData/Task/Nth-root/Dart/nth-root.dart
2023-12-16 21:33:55 -08:00

11 lines
204 B
Dart

import 'dart:math' show pow;
num nroot(num value, num degree) {
return pow(value, (1 / degree));
}
void main() {
int n = 15;
num x = pow(-3.14159, 15);
print('root($n, $x) = ${nroot(n, x)}');
}