09-15-2022, 08:23 PM
(This post was last modified: 09-15-2022, 08:25 PM by Kernelpanic.)
Ok, I didn't understand almost anything, but what the heck.
In case anyone is interested: A function that can be used to calculate the n-te root from a basis. Certainly still room for improvement when it comes to larger numbers, in terms of clean formatting.
In case anyone is interested: A function that can be used to calculate the n-te root from a basis. Certainly still room for improvement when it comes to larger numbers, in terms of clean formatting.
Code: (Select All)
'N-te Wurzel berechnen - 15. Sept. 2022
'sqrtn(x, n) = x ^ (1 / n)
Option _Explicit
Declare Function Nte_Wurzel(n As Double, x As Double) As Double
Dim As Double n, x
Print
Input "Wurzelexponent: ", n
Input "Radikand : ", x
Print
Print Using "Die ##.# Wurzel aus ###.# ist: ##.###"; n, x, Nte_Wurzel(n, x)
End
Function Nte_Wurzel (n As Double, x As Double)
Dim wurzelx As Double
wurzelx = x ^ (1 / n)
Nte_Wurzel = wurzelx
End Function