why it doesnt work?
why it doesnt work?
(OP)
why this code doesnt work?? if i put k += 1 it gives the correct anwear k = 6
*Whats going on?
Sub Main()
Dim m As Double(,) = {{6, 2, 6}, {1, 3, 7}}
Dim k As Double
Dim A0 As Double
Do Until A0 = 1.0
k += 0.1
A0 = m(0, 0) / k
Loop
Console.WriteLine("k is " & k)
*Whats going on?
Sub Main()
Dim m As Double(,) = {{6, 2, 6}, {1, 3, 7}}
Dim k As Double
Dim A0 As Double
Do Until A0 = 1.0
k += 0.1
A0 = m(0, 0) / k
Loop
Console.WriteLine("k is " & k)





RE: why it doesnt work?
Good Luck
johnwm
RE: why it doesnt work?
RE: why it doesnt work?
Now if you explain more of what you are trying to do we can help you. My best guess is that you are trying to normalize an array. If that is the case why not just take m(0,0) and that is what you need to divide by to get A0=1.0 (ie k=m(0,0)).